Sybase数据库常用sql语言
Sybase数据库常用sql语言 1,表备份: --table_name1:需要备份的表; table_name2:备份后的表 SELECT * into table_name2 from table_name1 2,删除列: ALTER TABLE table_name DELETE column_name; 3,增加列: ALTER TABLE table_name ADD (column_name DATA_TYPE [NOT] NULL); 4,修改列的空与非空: ALTER TABLE table_name MODIFY column_name [NOT] NULL; 5,修改列名: ALTER TABLE table_name RENAME old_column_name TO new_column_name; 6,快速建立临时表: SELECT * INTO table_name_new FROM table_name_old; 7,修改表名: ALTER TABLE old_table_name RENAME new_table_name 8,增加主键约束: ALTER TABLE tb_name ADD CONSTRAINT pk_name PRIMARY KEY(col_name,..) 9,删除主键约束: ALTER TABLE tb_name DROP