mysql基本操作语句

首先配置主键id  类型int  自动递增 无符号  主键打勾  不是null

 

查询SELECT * FROM m_newroomer_find;

插入INSERT INTO m_newroomer_find (room_id,room_total_time,room_cur_silver,goldconsumption_per_hour)
VALUE
(20,20,200,20),
(30,30,300,30);

#修改 UPDATE m_newroomer_find SET room_id='30' WHERE id=2
##UPDATE 表名 SET 字段名=字段值 WHERE 条件


#删除 DELETE FROM m_newroomer_find WHERE room_id='1'


## sort,limit 50(限制)

#排序 SELECT * FROM m_newroomer_find WHERE id>=3 ORDER BY room_cur_silver
SELECT * FROM m_newroomer_find WHERE room_id=30 LIMIT 2

 

posted @ 2018-05-10 17:53  程序媛2019  阅读(120)  评论(0编辑  收藏  举报