sqlserver·ÖÒ³(¶þ)sqlserver2005ǧÍò¼¶·ÖÒ³²éѯ
ÔÚsqlserver2005ÏÂʹÓÃÏÂÃæÓï¾ä
WITH t AS (
SELECT ROW_NUMBER() OVER(ORDER BY id DESC) as row_number, id,ss
from Table4
)
Select ROW_NUMBER() OVER(ORDER BY id DESC) as row_number1,id,ss
from t
where row_number BETWEEN 11000011 and 11010020
sqlserver2000²»Ö§³Ö¸Ãд·¨£¬¸Ãд·¨1ǧÍòÌõÊý¾Ý±íÖвâÊÔ¹ý¡£
Ïà¹ØÎĵµ£º
1¡¢²é¿´ÔÊý¾Ý¿â±¸·ÝÇé¿ö£ºRESTORE FILELISTONLY from DISK = 'c:\NMGCNC-BABY_2009-4-1.dat' WITH NOUNLOAD, FILE = 1
2¡¢½øÐÐÊý¾Ý¿â»¹Ô£º
restore database babyAndwed from DISK = 'c:\NMGCNC-BABY_2009-4-1.dat' with move 'babyAndwed_Data' to
'c:\NMGCNC-BABY_Data.MDF',move 'babyAndwed_Log' to 'c:\NMGCNC-B ......
SQL-Structured Query Language
--(¿ªÆôSQL·þÎñ£ºnet start mssqlserver)
--(ÔÚÃüÁîÐÐÖÐÊäÈë'sqlwb'ÃüÁî¿É´ò¿ªSQL¹ÜÀíÆ÷ )
--(Èç¹û ......
ÏÖÔÚÒ»°ã³£ÓõÄÓÐÒÔÏÂ2ÖÖ·½·¨:
1. select top @pagesize * from table1 where id not in (select top @pagesize*(@page-1) id from table1 order by id) order by id
2. select * from (select top @pagesize * from (select top @pagesize*@page * from table1 order by id) a order by id desc) b or ......
SQLServerʱ¼äÈÕÆÚº¯ÊýÏê½â,SQLServer,ʱ¼äÈÕÆÚ,
1. µ±Ç°ÏµÍ³ÈÕÆÚ¡¢Ê±¼ä
select getdate()
2. dateadd ÔÚÏòÖ¸¶¨ÈÕÆÚ¼ÓÉÏÒ»¶Îʱ¼äµÄ»ù´¡ÉÏ£¬·µ»ØÐ嵀 datetime Öµ
À ......
In the latest installment of the SQL Server interview questions, we will outline questions suitable for a DBA interview to assess the candidates skills related to SQL Server system databases. In this tip, the questions are there to read, but the answers are intentionally hidden to really test your s ......