use master
create database Test
go
--------------
use Test
--学生表
if exists (select *from sysobjects where name='Students')
drop table Students,Score
go
create table Students(
stuId int primary key ,
stuName nvarchar(50) not null,
sex nvarchar(50) not null ,
className nvarchar(max) not null,
age int check(len(age)>0)
)
go
--成绩表
create table Score(
stuId int references Stu
sql练习
最新推荐文章于 2024-06-23 15:30:17 发布