1、以查询结果建表

create table newTableName select column1 [newName1] [, column2 [newName2], .. , columnn [newNamen]] from oldTableName;

2、创建索引:当数据量超大时,大大缩短查询时间。但增加插入时间。

create index indexName on painfo(column1 [, column2, .. , columnn])

3、字段名中包含函数,加键盘上与“~”同按键的“ ` ”, 非" ' "

如:

select `sum(WORKLOAD_TOTALPRICE)` from fee

4、修改列名

alter table tableName change oldColumnName newColumnName oldDataType

 posted on 2015-05-02 16:16  要更努力了..  阅读(107)  评论(0编辑  收藏  举报