I am very new to sql. feel a little stupid to ask this question
Say I have this table
Warehouse(shipperid, name , state). Then I define another table
warehouse_maine (shipperid, name, state) which should only contain the warehouse located in maine. after I insert all the data for warehouse. I want to create a trigger for
warehouse_maine, which insert the warehouse data only in maine state.
CREATE TRIGGER TRIGGER01 ON WAREHOUSE_MAINE FOR INSERT AS select * from warehouse where warehouse.state= maine
This is what I thought but it's obviously wrong. what should be the syntax after keyword AS?