MySQL语法模板 SQL语句:常用

MySQL语法模板系列

  1. SELECT 查询语句
SELECT col_name,...
  FROM table_name
 WHERE where_condition
 GROUP BY col_name,... 
HAVING where_condition
 ORDER BY col_name,...
 LIMIT offset,row_count
  1. INSERT 插入语句
INSERT INTO table_name(col_name,...) values(expr,...)
  1. UPDATE 更新语句
UPDATE table_name SET col_name=expr,... WHERE where_condition
  1. DELETE 删除语句
DELETE FROM table_name WHERE where_condition 
  1. REPLACE INTO 插入数据 如果已存在则删除旧数据插入新数据
REPLACE INTO table_name(col_name,...) values(expr,...)
    原文作者:liuawei
    原文地址: https://www.jianshu.com/p/9b65a754c425
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞