Every developers need to deal with stored procedures in daily life through SQL Server and need to follow different patterns to put signature and format to consistence structure of sps.
I have seen that many developers who start to create sp with New Query -> Create Stored procedure and then try to format the sp and put signature.
Instead we can use following best practice to create stored procedure in SQL Server
1) Go to Stored procedure tab and click New Stored Procedure
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0_0YsDPHvKH7rN8-kWll6vFkOSMQo-s3iIk5FIK9tWnouslQbx21-RAlD-rXABry8j4VNR7la_ilnH7UI_0hHFHk27LXVdxFRFSVpEy5kqZX-SZMsTE8RRBhtKk2fTQwSrzeBCijcB36Z/s1600/SQL-Create+stored+procedure-1.png)
2) Press CTRL + SHIFT + M and it will prompt template to enter parameters information
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisDr3SWfDUshGb8AUkEe055OGUcd34XzsOZV4dQxYkTxjG-z9woNu6MSADWKmGZ-NopsfpIYGW_FXBmo0P7NGMhB5jmnmp_rjvAzWEE6VnJDwJ5Rlaj__WUXKAyeLEUXLsM8M_UwNeIs-B/s1600/SQL-Create+stored+procedure-2.png)
3) Enter respective information and click OK and it will apply format & signature accordingly so your stored procedure remain consistent in format & signature wise
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL3xpqbuxJy3tRvcz-_3VFYqhlPyqbwYUQkQRo6D8iH2YzNblHoAg2G7DiG7G4eAqEywFi65jVtL9UaPq6S_efyVvBHTyguT4XN6ju6KB3FS_syY0bTooqPdGVQKI-gStIgGbO4EPzXyPU/s400/SQL-Create+stored+procedure-3.png)
cheers..
1) Go to Stored procedure tab and click New Stored Procedure
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0_0YsDPHvKH7rN8-kWll6vFkOSMQo-s3iIk5FIK9tWnouslQbx21-RAlD-rXABry8j4VNR7la_ilnH7UI_0hHFHk27LXVdxFRFSVpEy5kqZX-SZMsTE8RRBhtKk2fTQwSrzeBCijcB36Z/s1600/SQL-Create+stored+procedure-1.png)
2) Press CTRL + SHIFT + M and it will prompt template to enter parameters information
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisDr3SWfDUshGb8AUkEe055OGUcd34XzsOZV4dQxYkTxjG-z9woNu6MSADWKmGZ-NopsfpIYGW_FXBmo0P7NGMhB5jmnmp_rjvAzWEE6VnJDwJ5Rlaj__WUXKAyeLEUXLsM8M_UwNeIs-B/s1600/SQL-Create+stored+procedure-2.png)
3) Enter respective information and click OK and it will apply format & signature accordingly so your stored procedure remain consistent in format & signature wise
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhL3xpqbuxJy3tRvcz-_3VFYqhlPyqbwYUQkQRo6D8iH2YzNblHoAg2G7DiG7G4eAqEywFi65jVtL9UaPq6S_efyVvBHTyguT4XN6ju6KB3FS_syY0bTooqPdGVQKI-gStIgGbO4EPzXyPU/s400/SQL-Create+stored+procedure-3.png)
cheers..
No comments:
Post a Comment