sql delete 语句怎么写 SQL 小白问题

2024-12-15 19:49:51
推荐回答(4个)
回答1:

delete from 表1 a
where(a.name=select b.name from 表2 b where b.score>90)

回答2:

DELETE FROM [表1]
WHERE EXISTS
(
SELECT 1 FROM [表2]
WHERE [表2].[class] = [表1].[class]
AND [表2].[name] = [表1].[name]
AND [表2].[score] > 90
)

回答3:

delete 表1 from 表1,表2
where 表1.class=表2.class
and 表1.name=表2.name
and 表2.score>90

回答4:

这个超级简单,用from子句就行。前面的人的回答都不对。来看看我的正确答案,然后给分吧!!
delete 表1 from 表2
where 表1.class = 表2.class and 表1.name = 表2.name and 表2.score > 90

给分吧!!