数据库中怎样用T-SQL语句建立表?并且在表中输入数据和设置数据的属性?

如题所述

数据库中怎样用T-SQL语句建立表?并且在表中输入数据和设置数据的属性?
create table student

student_id int primary key, 整型,主键约束
student_name varchar(20) not null,可变长字符串类型,非空约束
student_age int check(student_age>6),整型,check约束
……

insert into table student values (1,'wangang',10)

insert into table student values (2,'zhaoqiang',9)

insert into table student values (3,'lihong',8)
温馨提示:答案为网友推荐,仅供参考
相似回答