I need to modify a script such that if a table exists I drop it and recreate it and if it doesn't exist I just create it. How do I do this? I've searched the help but I'm still stuck. Thanks
You can implement a stored procedure on the splbase which contains the functionality to drop a table or receatea table. To decide wether drop or create you can have a look into the syscatalog ( sysadm.systables ).
Now it's very simple to execute the procedure with table name and DDL script as parameter.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.