sql删除id
Ⅰ sql 语句 批量删除指定id
删除整条记录
delete from a where b like '%.abc'
只是清空含有.ACB的B字段:
update a set b = null where b like '%.abc'
Ⅱ 用sql语句删除表中的某个ID
删除id值为80的行
delete from url where id = 80
Ⅲ SQL 删除A表中指定时间内的内容和ID记录
insert
a.id
into
#kkk
select
a.id
from
a,b
where
a.id=b.id
delete
from
a
where
a.id
in(select
id
from
#kkk)
delete
from
b
where
b.id
in(select
id
from
#kkk)
-------------------------
第一句得到两个表里的相同记录并插入临时表
第二句把A表里的记录删除,条件是#kkk表里的ID
第三句把B表里的记录删除,条件是#kkk表里的ID
Ⅳ 如何用sql语句删除id 号不连续的三个记录
delete
from
student
where
id
in
('1','4','6')
或者:
delete
from
student
where
id='1'
or
id='4'
or
id='6'
如果id是数字类型的就不用加单引号
Ⅳ sql语句如何删除主键
(1)如图:删除下面uid主键
语句:ALTER TABLE `6h_360_pay` DROP PRIMARY KEY;
”6h_360_pay“是表名;
(2)如下图,再创建一个长度为11的int的类型、自增、且不为空的字段id为主键
语句:ALTER TABLE `6h_360_pay`ADD COLUMN `id` int(11) NOT NULL AUTO_INCREMENT FIRST ,ADD PRIMARY KEY (`id`);
Ⅵ sql命令删除id用SQL语句批量删除指定ID
delete
from documents
where ID > 5000
Ⅶ sql语句中一下子删除两个id的写法
delete from 表名 where id=1 and id=2
delete from 表名 where id in (1,2)
Ⅷ SQL 删除多表中一个关联的ID
级联删除
或者触发器