sql sever操作问题

来源:百度知道 编辑:UC知道 时间:2024/06/05 21:00:16
在pubs数据库中,执行下面操作(利用查询分析器完成)
1.在authors表中找出编号第五、六位是“80”的作者的姓名,并显示他们的作者编号。

2.在titles表中显示书名包含“computer”字样的书名。

3.从titles表中找出1994年后出版的书,并显示其价格、出版日期和书名。

4.统计authors表中的作者总数,并以“authors表的记录总数“为标题显示出来。

5.统计authors 表中加州的作者总数,并以“作者总数(加州)“为标题显示出来。

6.请将表titles中的type按类型分,并求出price的和,显示为价格。

刚学MS sql sever2000 在查询分析器不知道怎么写代码
写出代码就行啦
会来帮帮忙吧! 谢啦

1.select au_lname+au_fname as fullname,au_id from authors where substring(au_id,5,2)=80;

2.select title from titles where title like '%computer%';

3.select price,pubdate,title from titles where year(pubdate)>1994;

4.select count(*) as authors表的记录总数 from authors;

5.select count(*) as 作者总数(加州) from authors where state=CA;

6.select type,sum(price) as 价格 from titles group by type;