2018-05-09

Day02課程——Mysql數據入門

1.安裝,使用

下載SQLyog
安裝,破解
打開注冊表注冊
使用
填寫需要的IP地址
用戶名,密碼 ,端口,數據庫地址

2.常用表格通配符

% 多個字符
_ 單個字符
like 模糊查詢
*所有全部

3.常用運算符

= > < <>

4.常用表格SQL語句單詞

select 查詢
from 來自哪里
where 篩選條件
count 總計
sum 求和
mux 最大值
min 最小值
AVG 平均值
like 模糊查詢
order by 排序
asc 升序(由小到大)
desc 降序(由大到小)
int 整數后面不加' '
varchar 變長字符類型加' '號

5.常用表格過濾SQL語句

select * from 表名 where 字段名=字段值
select * from 表名 where 字段名>字段值
select * from 表名 where 字段名<字段值
select * from 表名 where 字段名<>字段值
select * from 表名 where 字段名 like '%字段值'

字段值';
字段值為數字時可不加''增加多個字段名時要加,

6.表格排序SQL語句

select * from 表名 order by 字段名 asc;
select * from 表名 order by 字段名 desc;

7.統計函數SQL語句

select count(字段名) from 表名;
select sum(字段名) from 表名;
select AVG(字段名)from 表名 ;
select max(字段名)from 表名 ;
select min(字段名)from 表名 ;

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容