开发者

using results of multi-table SELECT to populate test database? (SQL Server 2005)

I was wondering if there were techniques or tools out there that would let me take a multi-table SELECT statement, complete with inner and outer joins, and determine after running it exactly which rows in each table are required to make the same SELECT return the identical rowset in a mini version of the database?

The ideal would be to generate a series of insert statements for each table that I could then run as preparation for a unit test of a sort involving my SELECT statement.

I know that foreign key constraints can get in the way of blind INSERTS but was curious if anyone knows of clever work involving finding out the appropriate rows for each table开发者_运维知识库, relaxing constraints, inserting the appropriate rows, then re-enabling the constraints?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜