MySQL 数据修改
2015-11-22 14:11
561 查看
插入
-- 数据插入 INSERT INTO insert_table (`datetime`, `uid`, `content`, `type`) VALUES('0', 'userid_0', 'content_0', 0), ('1', 'userid_1', 'content_1', 1); --复制相同数据 insert into users select * from users where nick=‘bingone’; Insert into Table2(field1,field2,...) select value1,value2,... from Table1 -- 创建新表插入 Select * into Table2 from Table1 where ...
修改
-- 多个表的UPDATE操作 UPDATE items,month SET items.price=month.price WHERE items.id=month.id; -- 数据修改 update users set nick = 'bingone', user_id = '890000000020158216',api_key = 'a4b3f38430ef7be6704b03181e76e7cb' limit 1; 更新相同数据的第一条 数据追加 update users set field=concat(field, '072110003') where field='072110001'; update users set user_tag = user_tag | 16 where nick = ‘bingone’;
删除
DELETE FROM table_name [WHERE Clause]
相关文章推荐
- MySQL 库操作
- MySQL 数据查询
- ubuntu14.04完全卸载mysql
- Ubuntu14.04下MySQL的安装
- windows下mysql提示Can't connect to MySQL server on 'localhost'
- gdb mysql stack get
- dtrace for mysql
- Windows下,MySQL5.6.x 免安装版(*.zip)的配置
- mysqli编程入门
- MMM 之 MySQL
- 修改wamp mysql密码
- mysql不支持full join的另一种解决办法 和根据多个表中的相同分组来连接查询
- 无法启动mysql服务,错误1067
- mysql复制表数据
- mysql不能开机启动服务
- 远程连接mysql,用户被拒绝的解决办法
- mysql基础知识点
- nodejs连接MySQL,做简单的CRUD
- MySql绿色版配置及使用详解
- Mysql CRUD(转)