adspace


how to get @@error and @@rowcount at the same time? : Sql dba

Answer Posted / Prashant Mishra

To get both @@ERROR and @@ROWCOUNT at the same time, you can use a SELECT statement with the GET DIAGNOSTICS statement. For example: `SELECT @rc := @@ROWCOUNT, @err := @@ERROR FROM dual;`

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is inner join faster than left join?

1287


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2102


what is dbms? : Sql dba

1070


What is the current version of postgresql?

1188


Does group by remove duplicates?

1120


What is the best sql course?

1064


Is primary key always clustered index?

1101


how to use regular expression in pattern match conditions? : Sql dba

1125


What is your daily office routine?

2353


Do we need to rebuild index after truncate?

1154


what are aggregate and scalar functions? : Sql dba

1142


what are the advantages of sql ? : Sql dba

1154


If a cursor is open, how can we find in a pl/sql block?

1252


Can we use distinct and group by together?

1146


How do I remove duplicates in two columns?

1202