存储过程T-sql语句

https://www.cnblogs.com/hqjy/p/4083994.html

--建库建表
create database student;
use student;
create table student(
sname varchar(10) not null,
sno int not null,
sage int not null,
ssex varchar(2) not null
);
alter table student
add constraint PK_sno primary key (sno),
constraint CK_ssex check(ssex = '男' or ssex = '女'),
constraint CK_sage check(sage > 8 and sage < 40)

insert into student values('张三', 103, 23, '男');
insert into student values('李四', 104, 24, '男');
insert into student values('王五', 105, 25, '男');
insert into student values('赵六', 106, 26, '男');
insert into student values('朱七', 107, 27, '男');
select * from student;
delete student;

 

https://www.cnblogs.com/daimajun/p/6538848.html

 

ALTER TABLE [dbo].[dt_coupon] ADD [getLimit] varchar(255) NULL
GO

EXEC sp_addextendedproperty
'MS_Description', N'领取限制信息',
'SCHEMA', N'dbo',
'TABLE', N'dt_coupon',
'COLUMN', N'getLimit'

posted @ 2018-09-10 17:46  你的斗志并没有失去  阅读(220)  评论(0编辑  收藏  举报