i want to get the rows that is updated by update command, but the result comes only the no of rows that are updated but i want the whole rows as in select command, so please tell me if anyone have any idea about it.
i was trying this.
update newTable set readKey='1' where id in (select id from newTable where id='1111')
the result of this command will be only the rows no not complete rows but i want whole rows to be displayed.
First of all, you can write you code simplier:
In SQL Server, this will return only the number of rows updated, but only when
SET NOCOUNTis not set.Basically you could do a second query to display the results just after the first one:
Or if this is SQL Server 2005/2008, then you can use OUTPUT clause: