--创建表
create table studentInfo
(
id int identity primary key,
name nvarchar(50),
xueke nvarchar(50),
score int
)
--添加字段
alter table studentInfo add xueke nvarchar(50)
--修改字段
alter table studentInfo alter column xueke nvarchar(100)
--删除字段
alter table studentInfo drop column xueke
--判断表是否存在
select * from sysobjects wherename=表名
--判断表中是否存在行数据
if exists(select * from studentInfo)