分类: C/C++
2008-08-01 16:58:49
CREATE TABLE table_name( column1 DATATYPE , column2 DATATYPE , ...);说明:DATATYPE - - 是资料的格式,包括:
int 4 BYTES long 4 BYTES float 8 BYTES date char( NUM ) NUM :数目,用户定义2、建立索引:
CREATE INDEX index_name ON table_name (column_name);说明:对某个表格的栏位建立索引以增加查询时的速度。
DROP TABLE table_name;4、删除索引:
DROP INDEX index_name;二、资料操作DML (Data Manipulation Language)
INSERT INTO table_name (column1,column2,...) VALUES ( value1,value2, ...);说明:
SELECT column1,columns2,... FROM table_name;说明:
SELECT * FROM table_name WHERE column1 = xxx1 and column2 = xxx2 ...;说明:
SELECT * FROM table_name WHERE column1 between xxx1_1 and xxx1_2 and column2 between xxx2_1 and xxx2_2 ...;说明:
UPDATE table_name SET column1 = ''xxx′ WHERE conditoins;说明:
DELETE FROM table_name WHERE conditions;说明:删除符合条件的资料。
EXIT;下载本文示例代码