设计一个SQL Server数据库Student,在其中建立一个数据表StudentInfo

2024-12-25 11:11:05
推荐回答(2个)
回答1:

我把数据库表帮你建好了 你把下面复制 然后建个Student 再查询执行下面命令表就能生成了,后面你可以再加入数据

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[StudentInfo]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[StudentInfo](
[studentNo] [int] NOT NULL,
[Name] [varchar](50) NOT NULL,
[Sex] [varchar](50) NOT NULL,
[Birthday] [datetime] NOT NULL,
[Class] [varchar](50) NOT NULL,
[RegTime] [datetime] NOT NULL,
[PicUrl] [varchar](50) NOT NULL,
CONSTRAINT [PK_StudentInfo] PRIMARY KEY CLUSTERED
(
[studentNo] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END

回答2:

你这属于什么问题呢??? 给你 建立一个?