sql表查询删除问题
来源:百度知道 编辑:UC知道 时间:2024/06/18 00:22:31
比如说我有一个a表,有甲乙丙丁四列,我想查询丙列中所有包含“天”这个字符的行,并且查询后删除有这行的甲乙丙丁所有数据。
查询语句
select 丙 from a where a.丙 like '天%'
删除语句
delect 甲,乙,丙,丁 from a where a.丙 like '天%'
查询语句
select 丙 from a where a.丙 like '%天%'
删除语句
delect from a where a.丙 like '%天%'
select * from a where 丙 like '%天%'
delect a where 丙 like '%天%'
select * from a where 丙 like '%天%'
delete from a where 丙 like '%天%'
update a set 甲 is null,乙 is null,丙 is null,丁 is null where 丙 like '%天%'
楼主是要删除列里的数据,不是把那行给删除,用delete不是误导人呢嘛