Saturday, September 8, 2007

SQL SET ROWCOUNT

SQL SET ROWCOUNT statement gives administrators some control over the execution of "runaway" queries issued by naive users of SQL. This statement stops the execution of a query as soon as a specified number of rows has been retrieved. In this way, system resources are not wasted, but users can see at least a partial result set. An informational message is displayed after the result set, indicating that SET ROWCOUNT is in effect.
If a fully executed query happens to return the exact number of rows specified by the ROWCOUNT value, the query-termination message is still displayed.

Example of SQL SET ROWCOUNT
SELECT * FROM EMPLOYEES
- It will return 10 rows of records.

After add SET ROWCOUNT
SET ROWCOUNT 5
SELECT * FROM EMPLOYEES
- It will return 5 rows of records instead of 10 row.
(Bacause you set the RowCount to 5)

SQL SET ROWCOUNT

5 comments:

Johnny said...

Great post, very useful.

http://www.sqlset.com

Jonathan said...

WoW nice blog buddy!Actually WoW is my favorite appreciation keyword. I also like to play. Wow Gold. I was looking for info regarding that and saw your website. Its nice and very interesting.

Ameet said...

very easily depicted the 1Definition..Thanks

fgdg said...

Do not pray for tasks equal to your powers.Pray for powers equal to Buy rs gold your tasks.Then the doing of work shall be no miracle, but you shall be the miracle, Fear not that the life shall come to an end, but rather fear that Runescape Money it shall never have a beginning,. At twenty years of age Runescape2 Money., the will reigns; at thirty, the wit; and at forty, the judgment.

fgdg said...

You laugh at me for being different, but I laugh at you for being the same LOTRO Gold, the consequences of today are determined by the actions of the past Lord Of The Rings Gold, to change your future,LOTRO Gold alter your decisions today.