Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can you get @@error and @@rowcount at the same time?

Answer Posted / sachin rakshe

If @@Rowcount is checked after Error checking statement then
it will have 0 as the value of @@Recordcount as it would
have been reset. And if @@Recordcount is checked before the
error-checking statement then @@Error would get reset. To
get @@error and @@rowcount at the same time do both in same
statement and store them in local variable. SELECT @RC =
@@ROWCOUNT, @ER = @@ERROR

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are user defined datatypes and when you should go for them? : Sql server database administration

1065


How to get a list of columns in a view using the "sp_help" stored procedure?

1090


Explain steps of normalization?

1066


How to delete an existing row with delete statements in ms sql server?

1152


What should be the fill factor for indexes created on tables? : sql server database administration

1180


What is the difference between varchar and nvarchar datatypes?

1142


What are the methods used to protect against sql injection attack?

1119


What are date and time data types in ms sql server?

1160


Can we use having clause without group by?

1031


How to list all columns in a table using odbc_columns()?

1033


How to edit table in sql server 2017?

981


What keyword you will use to get schema appended to the result set of a ‘for xml’ query?

1064


What are unicode character string data types in ms sql server?

1346


How to reaname table name without using sp_Rename in sql server..?

1040


what is denormalization? : Sql server database administration

973