From the course: Microsoft SQL Server 2022 Essential Training
Unlock this course with a free trial
Join today to access over 24,100 courses taught by industry experts.
Create stored procedures - SQL Server Tutorial
From the course: Microsoft SQL Server 2022 Essential Training
Create stored procedures
- Let's take a look at these store procedures from the Wide World Importer's database. Now, there's two different ways that we can get to see all of these store procedures that already exist in the database. The first one is to go into the Object Explorer and expand the Wide World Importer's database. Then expand the programability folder and finally open up these store procedures folder. Here you can see that this database already has quite a few store procedures created inside of it. Another way that we can get to the same information using Transact SQL is to run the query that I have starting on line umber six. This will pull out the schema name and procedure name columns from a system table called sys.procedures. If I run these lines here and press execute, you'll see that we get these same information back that we're seeing over here in the Object Explorer window. So this is a list of all of the store procedures…
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
-
-
-
-
-
-
-
-
Create a view of the data8m 33s
-
(Locked)
Data table indexes3m 49s
-
(Locked)
Create additional indexes on a table2m 52s
-
(Locked)
Aggregate functions7m 14s
-
(Locked)
Use built-in functions5m 15s
-
(Locked)
Leverage user-defined scalar functions7m 12s
-
(Locked)
Introduction to stored procedures3m 58s
-
(Locked)
Create stored procedures5m 34s
-
(Locked)
Parameterized stored procedures4m 42s
-
-
-
-
-