使用create view 语句创建一视图,显示student表中MA系的学生学号(sno),姓名(sname),性别(ssex)信息。

这个语句怎么写?
2024-10-27 18:56:37
推荐回答(2个)
回答(1):

create view viewname as
select sno,sname,ssex from student where .....

回答(2):

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

create VIEW my_student

SELECT sno as 学生学号,sname as 姓名,ssex as 性别 FROM student

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

将以上代码复制到SQL查询分析器运行,OK