Performing stored procedures in SQL Server
Stored procedures are a set of scripts that can run at a click of a button to perform a specific task. Stored procedures are great to use for many reasons, especially when it comes to manual tasks. They help automate manual tasks and make things run more efficiently.
Note
To learn more about stored procedures in Microsoft SQL Server, visit the following website: https://msdn.microsoft.com/en-us/library/ms345415.aspx.
In the previous example, we had to manually enter the values for the three countries that were to be used as columns. Additionally, we had to format them in the following manner:
[Canada], [France], [United Kingdom]
Well, what if the database had an update and changed the naming for United Kingdom
to UK
instead? Our script would need to be updated. Also, if we wanted to include all of the countries as columns, we would need to use the following list:
[Australia],[Canada],[France],[Germany],[United Kingdom],[United States]
If...