2025年数据库课程(数据库课程号怎么表示)

数据库课程(数据库课程号怎么表示)p 创建表 br use MySchooll 将当前数据库设置为 MySchool br go br if exists select from sysobjects where name Student br drop table p

大家好,我是讯享网,很高兴认识大家。



 <p>--创建表<br /> use MySchooll   --将当前数据库设置为MySchool<br /> go<br /> if exists(select *  from sysobjects where name&#61;&#39;Student&#39;)<br /> drop table Student<br /> go<br /> create table Student    --创建学生信息表<br /> (<br />     StudentNo int NOT NULL,                  --学号&#xff0c;非空(必填)<br />     LoginPwd nvarchar(20)NOT NULL,           --密码&#xff0c;非空(必填)<br />     StudentName nvarchar(20)NOT NULL,         --姓名&#xff0c;非空(必填)<br />     Sex bit NOT NULL,               --性别&#xff0c;非空(必填)<br />     Gradeld int NOT NULL,        --年级号(必填)<br />     Phone nvarchar(50) NOT NULL,      --电话(必填)  <br />     BornDate datetime NOT NULL,      --出生日期(必填)  <br />     Address nvarchar(255),          --地址<br />     Email nvarchar(50),             --邮件帐号<br />     IDENTITYCard varchar(18)          --身份证号<br /> )<br /> GO</p> 

讯享网


–创建表
if exists(select * from sysobjects where name=‘Subject’)
drop table Subject
go
create table Subject
(
    SubjectNo int identity(1,1) not null,              –课程编号  标识列,白增1 非空
    SubjectName nvarchar(50) not null,              –课程名称 非空
    ClassHour int ,              –学时 
    GradelD int,              –年级编号  










讯享网

–创建表

if exists(select * from sysobjects where name=‘Result’)
drop table Result
go
create table Result
(
    StudentNo int  not null,              –课程编号  非空
    SubjectNo int not null,              –课程编号 非空
    ExamDate int ,              –考试日期  非空
    StudentResult int,              –考试成绩  非空







)
go
 


小讯
上一篇 2025-05-08 22:49
下一篇 2025-04-27 21:16

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/168216.html