prss.net
当前位置:首页 >> 求一条MYSQL删除语句 >>

求一条MYSQL删除语句

delete from 表名 where 条件 例如:user 表 id name address age; delete from user where id = 1;

例子: DROP DATABASE `phpwind`; DROP是标准的SQL命令,各大数据库系统都应该支持,在MYSQL上完全支持。

delete from 表名 where 数据库中对应的列名1='"+txtbox1.Text+"',数据库中对应的列名2='"+txtbox2.Text+"' and 数据库中对应的列名3='"+txtbox3.Text+"';

delete from 表 limit 1;

delete from 表名 where id in (1,3,5)

代码为:delete a,b from 表A a,表B b where a.id = b.column_id and a.id=1;这样就可以了~

1、删除数据用delete语句,后面跟where 列明=XXX 要删除的那一列 2、例子:delete user where id=7788

// delete from products as p where LENGTH(p.b_name)=1; delete from products where LENGTH(b_name)=1; len() datalen() LENGTH()

删除重复行sql,将会删除所用重复的数据,保留一条不重复的数据 ALTER IGNORE TABLE your_tableADD UNIQUE INDEX idx_name (cols_a, cols_b, cols_c, cols_d, cols_e);

网站首页 | 网站地图
All rights reserved Powered by www.prss.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com