Generating Scripts

  • I have tried to generate a script that drops a table then recreates it again with an extra field (I have edited the automatic script for this myself). The script is generated by selecting the appropriate table, and then selecting to script Indexes and PK, FK, constraints etc. A foreign key on another table that is linked to this table is obviously dropped before the selected table can be dropped. However unfortunately this is never subsequently recreated. Is this a bug in the script engine, or is there a way around this?

  • You might ned to check the script if it has create FK statement before you run the script. It might just have the drop statement only.

  • Yes, that is exactly the problem. It DROPS the Foreign Key, but never recreates it when the Table is recreated. Is this by design, or a limitation of the script engine? Or am I doing something wrong?

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

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