Hi guys in my last post (Filling all your tables with test data) i explained how we can fill multiple tables by test data by using My own Stored procedure , but after i creating the script and i do on it more test on our staging environment and it’s working very well i got one issues on the script ( SP can not cover the tables with composite primary key ) at this time I reviewed the Stored procedure from the scratch to know where is the issue and how i can solve it at the end i asked on e of my best friends Mohamed Abdel Kariem mentor T-SQL to help me in this subject and at the end we do awesome script and here the below new enhancement on our main stored procedure .
Stored procedure enhancement:
- SP now supported tables with composite primary key
- SP now supported tables with composite primary key with data type uniqueidentifier.
- reduced the liens in the SP by using CASE technology
- using QUOTENAME function instead of more concat.