I have a temporary table "table", a table called "sales", and a table called "company_address". Now I want to design a trigger in SQL SERVER for them.
"
Insert into table
values ('CompA','USA','New York','Lee','555-777-8888'),
('CompA','USA','New York','Ron','555-777-8888'),
('CompB','Canada','Vancover','Yale','555-777-8888'),
('CompB','Canada','Vancover','Wendy','555-777-8888')
"
When I inserted the code above, the company name(1st column), the country name, the city name should be inserted into table "company_address". The sales' name, and the tel number should be inserted into table "persons".
By the way, if you can teach me how to use the NEWID function to generate a unique identifier for the company name, and how could the table "sales" inherited from it. That would be extremely helpful.