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
Do you know what is sql service broker?
What are the advantages of using cte?
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
What is the contrast between sql and mysql?
How to create a ddl trigger using "create trigger" statements?
What is log ldf?
What options are there to delete rows on the publisher and not on the subscriber? : sql server replication
What is collation?
How to perform key word search in tables?
What is checkpoint in sql server?
Difference between connected and disconnected database in .net with sql server?
What do you mean by stored techniques? How would we use it?
What is the difference between DATETIME2 and DATETIME?
What do you understand by check constraint in sql server?
Mention the uses of stored procedures.