cambridgesteve
Programmer
Is it possible to have a TRIGGER on a table such that when an INSERT is made into it - it INSERTs another 3 entries for example ?
Let's suppose we have a table company_settings and if we INSERT an entry for one company it INSERTS for another (associated) 3 companies.
If the table is structured:
[companyid] INT
[settingcode] INT
... and we INSERT (3, 10) it also then TRIGGERS and INSERTS (4, 10), (5, 10) and (6, 10) for example.
I'm unsure whether something like this is possible (and happy to throw in the towel if it's not)...
Any help would be appreciated.
Thanks.
Steve
Let's suppose we have a table company_settings and if we INSERT an entry for one company it INSERTS for another (associated) 3 companies.
If the table is structured:
[companyid] INT
[settingcode] INT
... and we INSERT (3, 10) it also then TRIGGERS and INSERTS (4, 10), (5, 10) and (6, 10) for example.
I'm unsure whether something like this is possible (and happy to throw in the towel if it's not)...
Any help would be appreciated.
Thanks.
Steve