dakota97
Well-known member
Stored Proc?...Trigger?...Other?
Hi all,
I have a project that Im working on that involves a SQL database with multiple tables that are all linked to a general Users table. The Users table includes an Identity field as the primary key. The other tables use this field as an identifier for the user that the record is associated with.
What method should I use so that if one of our apps inserts a record into a table, the "user information" is added to the Users table first, and then the Identity field is copied and combined with the rest of the information, and inserted into the original table? Im vaguely familiar with stored procedures and triggers, but I have never used either one of them as of yet. Any suggestions/examples/tutorials would be greatly appreciated.
Thanks in advance,
Chris
Hi all,
I have a project that Im working on that involves a SQL database with multiple tables that are all linked to a general Users table. The Users table includes an Identity field as the primary key. The other tables use this field as an identifier for the user that the record is associated with.
What method should I use so that if one of our apps inserts a record into a table, the "user information" is added to the Users table first, and then the Identity field is copied and combined with the rest of the information, and inserted into the original table? Im vaguely familiar with stored procedures and triggers, but I have never used either one of them as of yet. Any suggestions/examples/tutorials would be greatly appreciated.
Thanks in advance,
Chris
Last edited by a moderator: