Posted in 面试题 onOctober 07, 2016
写一个SQL存储过程,建立一个表USER 字段是姓名,年龄,职位,权限,然后向里面插入6条数据,然后查询出年龄大于18的所有信息。
Create table user
(
Name varchar(20),
Age int,
Position varchar(20)
Quanxian varchar(20)
)
Insert into user values(‘111’,11,’11111’,’1111111’)
Insert into user values(‘112’,12,’11112’,’1111112’)
Insert into user values(‘113’,13,’11113’,’1111113’)
Insert into user values(‘114’,14,’11114’,’1111114’)
Insert into user values(‘115’,15,’11115’,’1111115’)
Insert into user values(‘116’,16,’11116’,’1111116’)
Create procedure selectUser
As
Select * from user where age >18
go
Create table user
(
Name varchar(20),
Age int,
Position varchar(20)
Quanxian varchar(20)
)
Insert into user values(‘111’,11,’11111’,’1111111’)
Insert into user values(‘112’,12,’11112’,’1111112’)
Insert into user values(‘113’,13,’11113’,’1111113’)
Insert into user values(‘114’,14,’11114’,’1111114’)
Insert into user values(‘115’,15,’11115’,’1111115’)
Insert into user values(‘116’,16,’11116’,’1111116’)
Create procedure selectUser
As
Select * from user where age >18
go
一道SQL存储过程面试题
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Tags in this post...
Reply on: @reply_date@
@reply_contents@