|
Posted by Erland Sommarskog on 03/23/06 00:50
Khan (amir@programmer.net) writes:
> I'm using table it has 100 rows, how can i update 10 or 15 rows at the
> same time with single query. In real case, if user enters "5" in
> textbox it means that the "5" rows will be updated.
>
> In SAS i was using 'outobs' {outobs = n} which means n rows will be
> affected.
As Anith said, you can use SET ROWCOUNT. In SQL 2005, you can also use
the TOP keyword to limit the update.
But as David said, the request as given makes little sense. It would
help if you included:
o CREATE TABLE statement for your table.
o INSERT statements with sample data.
o The desired result given the sample.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|