Is there triggers which will accomodate creation of tables. Say for example
i have the following table. Registration and it has the field Status. When the status turns Approved. I want to trigger the creation of a table called House Owner with the folllwing attributes.
Is there a way to actually trigger the creation of a table? pls advise..
This is a really bad idea for all sorts of reasons. Tables should not need to be created at runtime. Please rethink what you are doing or if you want more help then explain what you are trying to achieve. Why can't you create this table along with the rest of your database?
ok i just wanted to clear my doubts, and was expecting some clarification here. as my supervisor keeps mentioning about automated processes for the database, i am just learning to explore on triggers as well now.. thanks for the clarification anyway.. i will create the table as per normal and just use triggers for the insert statement.. that will make more sense.
i will create the table as per normal and just use triggers for the insert statement.. that will make more sense.
In fact triggers are not generally a good way to implement data manipulation code at all. It's usually much better to put your code in a regular stored procedure, not a trigger. I would recommend a trigger only for operations that do not require data to be modified (a business rule for example).