I want to create a trigger such that whenever a user is inserted in TABLE A(userid,type) then his "userid" along with some predefined value, depending in his "type", is inserted in TABLE B(userid,value)
For example in TABLE A if following value is inserted:
userid | Type
23 | admin
then, depending on condition if Type=admin value=1 OR if Type=user value=2
, the following insertions are made:
TABLE B
userid | Value
23 | 1
Is this possible?