Use of Rowcount in SQL Server
We can use rowcount sql property to set the number of rows to be shown in the output.
for an example,
lets say there are 10 records in a table, if we set the rowcount to 5 then when retrieve records from that table, only 5 records will be shown.
if you rowcount to 0 then all records will be retrieved and shown in output.
in above example only 5 rows have been retrieved and shown in output as we set the rowcount to 5.
for an example,
lets say there are 10 records in a table, if we set the rowcount to 5 then when retrieve records from that table, only 5 records will be shown.
if you rowcount to 0 then all records will be retrieved and shown in output.
SET ROWCOUNT 5
SELECT ref_num FROM tbl_po_master
in above example only 5 rows have been retrieved and shown in output as we set the rowcount to 5.
Comments
Post a Comment