在SQL SERVER 2000中怎样用命令方式删除表名及字段?
1、删除整张表:drop table 表名
2、删除表中字段:alter table 表名 drop 字段名
**********************
3、删除数据:delete from 表名 from关键字可以省略。
4、删除数据:truncate table 表名 与delete的区别是不记日志。
5、删除表中字段:alter table 表名 drop column 字段名 第2种是非标准写法在SYBASE中是允许的,在SQL SERVER中不允许。
谢谢一片叶子的提醒,在此补充一下,免得误导人。
。
delete from tablename 删除的是表中的记录 drop table tablename 是删除表 alter table tablename drop column columnname 删除列