SQL Optimization Tip [Tip/Trick]
Last Updated: 16 Nov 2009
Page Views: 497
Rating: 4.14/5
Votes: 5
Popularity: 2.90
Bookmark Count: 3
Licence: The Code Project Open License (CPOL)
Use SET NOCOUNT ONWhenever we write any procedure and execute it a message appears in message window that shows no of rows affected with the statement written in the procedure and we become very happy to see that our procedure is working. But do you know that this message creates an extra overhead o
TOP WITH TIES clause in SELECT queries [Tip/Trick]
Last Updated: 24 Nov 2009
Page Views: 646
Rating: 4.00/5
Votes: 1
Popularity: 0.00
Bookmark Count: 4
Licence: The Code Project Open License (CPOL)
The SELECT TOP N query always returns exactly N records, and randomly drops any record that have the same value as the last record in the group.SELECT TOP 5 price, Booktitle FROM BookTitles ORDER BY price DESCThis query will give 5 records from table BookTitles in descending order by price. ProblemS