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

如题所述

create table 表名(
列名1 类型1 约束条件1,
列名2 类型2 约束条件2

insert 表名 vluues column(参数1,参数2)
温馨提示:答案为网友推荐,仅供参考
第1个回答  推荐于2017-12-15
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)本回答被提问者采纳
相似回答