--創建表
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)