In SSMS is there a way to generate a script for table creation based on the table output by a view?
In SSMS is there a way to generate a script for table creation based on th开发者_开发技巧e table output by a view?
There is no simple way of doing such a thing, because selected data is not sufficient to describe the table. Eg. there might be identity column and you won't know or some column may be nullable but actual data has no nulls and so on.
This is in general a complex task that requires a dedicated program, not an ordinary database management utility.
I don't know how, but the answer to this question may prove useful to you. It is concerning procedures, but the same principles might apply.
精彩评论