一.鏈接查詢以內鏈接函數
select a.字段,b.字段 from 表1 a,表2 b where a.字段=b.字段 And ...3d
二.DML 數據操做語言blog
1.增 insert into valuesdate
1-insert into 表名 values (跟全部字段一一對應的值的列表)select
2-insert into 表名(字段列表) values (跟字段列表一一對應的值的列表)im
3-insert into 表名 select 對應的字段列表 from 源表名 where 條件 統計
4-insert into 表名(字段列表) select 對應的字段列表 from 源表名 where 條件 數據
2.刪 delete查詢
1-全表刪除:delete from 表名 img
2-選擇刪除:delete from 表名 where 條件
3.改 update set
1-全表修改:update 表名 set 字段名=新值,...
2-選擇修改:update 表名 set 字段名=新值,... where 條件
三.內置函數之聚合函數
1.COUNT 統計記錄條數
2.SUM( ) 統計合計數
3.AVG 統計平均值
4.MAX 返回最大值
5.MIN 返回最小值
6.特色
1-能夠在查詢中單獨使用,也能夠和分組一塊兒使用
2-若是字段內容爲null,統計時會被忽略