1. in ,
example : select * from monday where category in('3')
選出在monday這個資料表中category = 3 的資料.
2.cross join
example : select id_cid.cid , u_tto.tid from id_cid cross join u_tto where id_cid.id = u_tto.did limit 0,30
將兩個資料表進行cross join , 不過只會cross id相同的資料.
3. insert into
example : insert into id_cid (id , c_id) select id , category from monday
由monday這個資料表中選出id與category兩個column , 插入到id_cid這個資料表的欄位中.
4. select two items
example : SELECT cid_id_tid.cid, cid_id_tid.tid FROM cid_id_tid
5. add column
example : ALTER TABLE customers ADD Discount VARCHAR(10);
( VARCHAR : A string of variable length)
6.drop column
example : ALTER TABLE table_name DROP COLUMN column_name
7.中文的欄位 , 其屬性要設定為utf8 (unicode)