建表:create table tablename();
插入:insert into tablename();
insert into tablename(col1,col2,...) values(...);
删除:delete from tablename where ... 可以rollback
drop table tablename; 不能rollback
truncate table tablename; 不能rollback
查找:select * from tablename;
修改:update tablename set col1 = .... where id = ?;
左连接:select a.* , b.* from a left join b on a.id=b.id;
按照id大小排序: select * from tablename where ..... oderby id;
选出特殊的组: select empid,count(*) from emp group by empid having count(*) > 10 ;
修改数据类型:alter teble [tablename] modify column [colname] datetime;
删除列:alter table [tablename] drop column [colname] ;
增加列:alter table [tablename] add column [colname] varchar;