Archive | SQL Server 2008 RSS feed for this section

Restore MS SQL Database with Move

28 Jan

RESTORE DATABASE bsc
FROM DISK = ‘e:\bsc.bak’
WITH REPLACE

RESTORE DATABASE bsc
FROM DISK=’e:\bsc.bak’
WITH
MOVE ‘bsc’ TO ‘c:\TSQL\bsc.mdf’,
MOVE ‘bsc_log’ TO ‘c:\TSQL\bsc_log.ldf’, STATS=5

Advertisements

RANK FUNCTION IN SQL

7 Sep

http://www.sql-programmers.com/Blog/tabid/153/EntryId/33/Ranking-Functions-in-SQL-Server.aspx

http://www.sqlservercurry.com/2009/04/rank-vs-denserank-with-example-using.html