Home > database >  About the delete and updata statement on the use of nested
About the delete and updata statement on the use of nested

Time:10-01

delete from the user where the uid (in
Select the uid from (
Select the uid as xiaojian the from user
The where (uid between 81 and 96)
Having xiaojian<91)
As temp);

CodePudding user response:

Repeated problems, the subquery alone cannot perform, here's the problem, oneself think reason (this is your own digging pit)
 select the uid from (
Select the uid as xiaojian the from user
The where (uid between 81 and 96)
Having xiaojian<91)
As temp

CodePudding user response:

To select the create the result set into a temporary table and then execute the delete


The create table TMP select XXX
Delete from TB in the where XXX (select * from TMP)
  • Related