摘要:
count(*) 查出来的是:结果集的总条数 count(字段名) 查出来的是: 结果集中‘字段名’不为空的记录的总条数 阅读全文
摘要:
删除主键 alter table 表名 drop constraint 主键名 删除之前先查询下系统表中的主键 select* from sysobjects where xtype ='pk ' 添加主键 alter table 表名 add primary key (字段名) alter tab 阅读全文
摘要:
alter table [表名] alter column [字段名][ 属性] 例子: 把Student表中Sno的int类型 修改为 varchar 类型 alter table Student alter column Sno varchar(20) not null 阅读全文