From the course: Database Foundations: Database Management
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Create a stored procedure in SQL Server
From the course: Database Foundations: Database Management
Create a stored procedure in SQL Server
- [Instructor] In the prior movie, we created a stored procedure on the PostgreSQL platform. And I thought it might be valuable to run through that exact same example again on the SQL server database. That way, you can see that the overall technique is the same, even if there are slight variations in syntax that's required. So once again, I have the script from the exercise files loaded into a new query window that's connected to my SQL server database this time. We can create a temporary table called my names with this command on line number four. Let's go ahead and highlight that and run it to create the temporary table. The only difference on this line is that in SQL server, we use this pound symbol or the hash sign as the first character in the name in order to create a temporary table. Next, we can create the stored procedure. Just like in PostgreSQL, SQL server uses the standard create procedure command. The only thing different here is that SQL server uses the at symbol for a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Add programming elements to the database3m 54s
-
(Locked)
Create a function4m 51s
-
(Locked)
Create a stored procedure in PostgreSQL4m 30s
-
(Locked)
Create a stored procedure in SQL Server3m 6s
-
(Locked)
Challenge: Write a stored procedure58s
-
(Locked)
Solution: Write a stored procedure8m 7s
-
(Locked)
-