DB_51aspx/SQLQuery.sql

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

use master
go
if exists(select*from sys.sysdatabases where name='Student')
drop database Student
go
create database Student
go
--使用Student 数据库
use Student
go
---------------------------学生信息表------------------------------
if exists(select*from sys.sysobjects where name='StuInfo')
drop table StuInfo
go
 
create table StuInfo
 (
 stuId int identity(1,1) constraint PK_StuInfo_stuId primary key,
 stuName varchar(10),
 stuPwd varchar(20)
 )

---------------------------教师信息表------------------------------ 
if exists (select * from sys.sysobjects where name='Teacher')
drop table Teacher 
go
create table Teacher
 (
 teaId int identity(1,1) constraint PK_Teacher_teaId primary key,
 teaName varchar(10),
 teaPwd varchar(20), 
 teaSubject varchar(10)    --科目名称
 )
 ---------------------------学生成绩表------------------------------
if exists (select * from sys.sysobjects where name='Grade')
drop table Grade 
go
create table Grade
 (
 gId int identity(1,1) constraint PK_Grade_gId primary key,
 stuId int references StuInfo(stuId),
 gSubject int references Teacher(teaId),     --科目名称
 gScore int 
 )
---------------------------表------------------------------
if exists (select * from sys.sysobjects where name='Systems')
drop table Systems 
go
create table Systems
(
 id int identity(1,1) constraint PK_System_id primary key,
 pareId int,
 name varchar(100),
 url varchar(200)
 )
 ---------------------------管理员表------------------------------
if exists (select * from sys.sysobjects where name='Admins')
drop table Admins 
go
create table Admins
后面还有 57 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。