当前位置: 移动技术网 > IT编程>数据库>Mysql > mysql常用sql语句总结

mysql常用sql语句总结

2019年08月30日  | 移动技术网IT编程  | 我要评论

增加一条数据

insert into table_name ( field1, field2,...fieldn )
                       values
                       ( value1, value2,...valuen );

如果数据是字符型,必须使用单引号或者双引号,如:"value"。

删除一条数据

delete from table_name [where clause]

如果没有指定 where 子句,mysql 表中的所有记录将被删除。

更新一条数据

update table_name set field1=new-value1, field2=new-value2
[where clause]

查询关键字的定义顺序

select distinct <select_list>
from <left_table>
<join_type> join <right_table>
on <join_condition>
where <where_condition>
group by <group_by_list>
having <having_condition>
order by <order_by_condition>
limit <limit_number>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网