Re: [SQL] Is it possible to redirect an update/insert/delete to a different table?

2005-11-26 Thread JuanCri
I don't know what do you mean... because if you want to insert to other table.. you can create a rule like this CREATE RULE myrule AS ON INSERT TO mytable DO INSTEAD INSERT INTO myothertable VALUES (NEW.col1, NEW.col2, NEW.col3); that will work for all inserts.. I think the problem will be the SE

Re: [SQL] query

2005-11-26 Thread JuanCri
First, INSERT statements are 1 to 1 with table rows... (unless you use a insert/select). Second, if you want to probe that.. it is better to create an UNIQUE index.. isn't it? Ok, if that's not enough for you... you can create a trigger that perform a SELECT COUNT(*) with the criteria and if it's