面试题:Sql Server的操作

题目:
题目
题目
答案如下:

(1)drop table Table1

(2)create table Table1(
Id int not null,
name char(100),
Age int,
Dept char(20)
);

(3)update Table2 set salary=(select Age from Table1 where Table1.id=Table2.id)

(4)update Table1 set name=Table1.Age

(5)select name,salary from Table1,Table2 where Table1.Id=Table2.Id

(6)create view v as
select Dept from Table1
group by Dept
having AVG(Age)>30

(7)select distinct Dept from Table1
order by Dept desc

(8)alter table Table1 add address char(30) 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值