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 / ramakrishna

DECLARE @RC int
DECLARE @ER int

INSERT INTO T(Cal1,Col2..)
SELECT ColX,ColY..
FROM T1

SELECT @RC = @@ROWCOUNT
SELECT @ER = @@ERROR

Is This Answer Correct ?    3 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is sql service broker?

1070


What are the advantages of using cte?

1005


I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that

2011


What is the contrast between sql and mysql?

1102


How to create a ddl trigger using "create trigger" statements?

1117


What is log ldf?

972


What options are there to delete rows on the publisher and not on the subscriber? : sql server replication

1207


What is collation?

1136


How to perform key word search in tables?

954


What is checkpoint in sql server?

1126


Difference between connected and disconnected database in .net with sql server?

1087


What do you mean by stored techniques? How would we use it?

1022


What is the difference between DATETIME2 and DATETIME?

1070


What do you understand by check constraint in sql server?

938


Mention the uses of stored procedures.

963