triggers for generating userID based on user's information.
Posted
by nectar
on Stack Overflow
See other posts from Stack Overflow
or by nectar
Published on 2010-06-15T13:08:23Z
Indexed on
2010/06/16
12:52 UTC
Read the original article
Hit count: 277
sql-server
|triggers
I have complaint table
1. tblProfile with columns
userId | name | age | address | mobileno |
2. tblUserId with columns userId | role | status
now when user fills the form I want to insert one row in tblProfile
, before inserting a new row I want to create userId
by combining starting letters of name and mobile no and then insert into tblprofile with userId after this I want to insert that UserId into tblUserId
table.
for this I have to use two triggers one is before insert
trigger and another is after insert
trigger.but I dont know how to capture user information to create userId and how to pass that Id to second trigger.
© Stack Overflow or respective owner