If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Hi ,
Suppose I have table A I want to write stored procedure when the new
entry in Table A , Its count entry should go in Table B
You could do this via a trigger ie when inserting a record into table A then just add one to the entry in the totals table (B). Even easier is to not use a table B at all and just use :
Code:
select count(*) from Table_A
This is simpler, doesn't use any triggers and will never get out of sync. Performance may be an issue if you have millions or records in table A though.