學(xué)習(xí)mysql之后的一點(diǎn)總結(jié)(基礎(chǔ))
更新時間:2012年05月21日 11:27:53 作者:
學(xué)習(xí)mysql之后的一點(diǎn)總結(jié),比較適合新手朋友
1.想要在命令提示符下操作mysql服務(wù)器,添加系統(tǒng)變量。(計算機(jī)-系統(tǒng)屬性——環(huán)境變量——path)
2.查詢數(shù)據(jù)表中的數(shù)據(jù);
select selection_list select * /columns
from table_list from table1/table2
where primary_constraint
group by grouping_columns
order by sorting_colomns desc降序 select * from table order by id desc;
having second_constraint
limit count select * from table where id limit 1,4;
2 常用的統(tǒng)計函數(shù):avg(字段),sum(字段),count(字段),min(字段),
select sum(字段2) as 別名 ,字段1 from table group by 字段1;
3 算數(shù)運(yùn)算,字符串,以及邏輯運(yùn)算構(gòu)造表達(dá)式:select * (price*0.8) as '80%' from table;打八折
2.查詢數(shù)據(jù)表中的數(shù)據(jù);
select selection_list select * /columns
from table_list from table1/table2
where primary_constraint
group by grouping_columns
order by sorting_colomns desc降序 select * from table order by id desc;
having second_constraint
limit count select * from table where id limit 1,4;
2 常用的統(tǒng)計函數(shù):avg(字段),sum(字段),count(字段),min(字段),
select sum(字段2) as 別名 ,字段1 from table group by 字段1;
3 算數(shù)運(yùn)算,字符串,以及邏輯運(yùn)算構(gòu)造表達(dá)式:select * (price*0.8) as '80%' from table;打八折
相關(guān)文章
mysql重置root密碼的完整步驟(適用于5.7和8.0)
這篇文章主要介紹了mysql重置root密碼的完整步驟,文中描述了如何停止MySQL服務(wù)、以管理員身份打開命令行、替換配置文件路徑、修改密碼以及重新啟動MySQL服務(wù)的過程,需要的朋友可以參考下2025-01-01
MySQL數(shù)據(jù)庫安全秘籍之守護(hù)數(shù)據(jù)金庫防火防盜防攻擊
MySQL是許多公司和組織的關(guān)鍵數(shù)據(jù)庫,因此其安全性的重要性如此顯而易見,為了確保MySQL的安全性,需要采取多種措施來增強(qiáng)其安全性,本文給大家介紹MySQL數(shù)據(jù)庫安全秘籍之守護(hù)數(shù)據(jù)金庫防火防盜防攻擊,感興趣的朋友一起看看吧2023-03-03
關(guān)于MySQL繞過授予information_schema中對象時報ERROR 1044(4200)錯誤
這篇文章主要介紹了關(guān)于MySQL繞過授予information_schema中對象時報ERROR 1044(4200)錯誤,本文給大家分享解決方法,對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-10-10

