用户工具

站点工具


sql:sql
  • cheat sheet
  SELECT * FROM table WHERE col=1 GROUP by ... HAVING count(*)>1 ORDER BY col;
  UPDATE table SET col=1 WHERE col=1;
  INSERT INTO table (ID,NAME) VALUES (1,'Labs');
  INSERT INTO table (ID,NAME) SELECT id,name FROM table;
  DELETE e1 FROM EMPLOYEE e1, EMPLOYEE e2 WHERE e1.name = e2.name AND e1.id > e2.id;
sql/sql.txt · 最后更改: 2020/05/09 17:20 由 admin