1.
SELECT top 10 IDENTITY(int, 1,1) AS 排名,'第'+bID+'名',bName,bReadTimes 浏览次数 into #temp FROM books ORDER BY bReadTimes DESC select * from #temp
SELECT top 10 IDENTITY(int, 1,1) AS 排名,'第'+bID+'名',bName,bReadTimes 浏览次数 into #temp FROM books ORDER BY bReadTimes DESC select * from #temp
解决方案 »
- 数据库里有个sex字段,存放男女,我想用01表示,可不可以用bit字段?还是要用int字段
- sqlce3.5(wince下的sql server)不能执行update\insert\delete命令,为什么呢?
- sqlserver里面的循环
- 表变小后,但mdf文件没有变小。请各位大侠帮助
- 如果中文字符是通过参数传入存储过程执行,如何在存储过程中达到“insert into t(a, b) values(N'简体', N'繁体')”的效果?
- sql 中交叉循环问题 急待解决
- inner join 后有重复数据的问题?
- sql server2000中except疑难问题
- SQLSERVER2000还原数据库出错
- 超级简单!就是不会!
- 如何查看sql server的日志?
- 我的是Win2000专业版本,为什么装上了SQL2000,注册不上本地的服务,我重新卸载了,又装回了原来的SQL7,还是注册不上LocaL,怎么回事啊,
if exists (select 1 from tempdb..sysobjects where name like '%#temp%')
drop table #temp
SELECT top 10 IDENTITY(int, 1,1) AS 排名,'第'+bID+'名',bName,bReadTimes 浏览次数 into #temp FROM books ORDER BY bReadTimes DESC select * from #temp
drop table #temp