Select 姓名,性别 from 学生表 where 性别=’男’ 32、用select语句显示表中所有内容 Select * from 学生表
33、若学分大于30,并且出勤率大于0.9可评为三好学生,请显示可评为三好学生的学生纪录。
Select * from 学生表 where 已得学分>30 and 出勤率>0.9
六、创建存储过程
34 Use jwgl
Go
Create proc pk_st @s_id char(8) As
Select * from student Where student_id=@s_id 执行语句:exec pk_st 'g9940202' 七、创建视图
35 Use jwgl
Go
Create view s_view As
Select * from student
Where class_id in(‘g99402’,’g99403’) Use jwgl Go
select * from s_view
八、T-SQL语言的应用
36 use jwgl go
CREATE TABLE department (
department_id char(6) NOT NULL, department_name nvarchar(20) NOT NULL, department_header nvarchar(8) NOT NULL )