| 數據操作語言DML筆記select
 select 列名1,列名2 ... from 表名1,表名2...
 [where 條件] like
 [group by...]
 [having ...]
 [order by...] 以特定的順序顯示 例:order by name asc;以名字顯示,為降序排列
 insert
 insert into 表名(列名1,列名2,... )values(值1,值2,...)-
 
 updateupdate 表名 set 列名1=值1,列名2=值2 ... [where 條件]
 delete
 delete from 表名 [where 條件] 注:條件時會刪除整個表名
 truncate
 truncate tables 表名 注相當刪除整個表名,在重建。非?
 加載數據
 load data infile '文件' into tables 表名 [fields terminated by '字符']
 導出數據
 select * from 表名 into outfile '文件'
 Mysql常用修改查看mysql默認編碼
 show variables like 'character_set_%';
 SHOW VARIABLES LIKE 'collation_%';
 讓mysql重起也可以使用utf8
 [mysqld]
 default-character-set=utf8
 [mysql]
 default-character-set=utf8
 
 本文出自:億恩科技【www.endtimedelusion.com】
 
 
		服務器租用/服務器托管中國五強!虛擬主機域名注冊頂級提供商!15年品質保障!--億恩科技[ENKJ.COM] |