如何解决MYSQL错误1248(42000):每个派生表必须有自己的别名

时间:2016-10-05 14:37:25

标签: mysql

我已经坚持了很长一段时间了,如何从我的代码中删除此错误?

Update( select * from Location natural join ConsumerLocation )
SET StreetNumber = 123,StreetName = 'Fake Street', StreetType = 'Fakeville',GoverningDistrict = 'Melbourne',PostalArea = 9999
WHERE UserName='kush';

然后我在我的代码中添加了类似的东西

Update( select * from Location natural join ConsumerLocation )t1
SET StreetNumber = 123,StreetName = 'Fake Street', StreetType = 'Fakeville',GoverningDistrict = 'Melbourne',PostalArea = 9999
WHERE UserName='kush';

现在显示错误代码1288:UPDATE的目标表t1不可更新。

0 个答案:

没有答案