题目:
答案如下:
(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)