new table in trigger

  • Hi

    this my second question in this day

    however

    Can I create new table in trigger and insert into its?

  • No you cannot - why would you want to do this anyway ?!







    **ASCII stupid question, get a stupid ANSI !!!**

  • Why would you do this? It is a bad idea and there's real reason to do it. Each time the trigger ran it would create a new table, which would error out or cause large numbers of tables.

  • Well, I suppose the intention was to put some check before the create (IF NOT EXISTS... CREATE TABLE), so that the number of new tables wouldn't be as high and errors would mostly be avoided, but of course the rest is true. If someone is really considering how to create tables in a trigger, then probably the design of the DB in question will have some serious flaw.

    Well, maybe it was just a question out of curiosity, not a real problem 🙂

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply