bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL CREATE PROCEDURE Keyword

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind SQL CREATE PROCEDURE Keyword?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ PROCEDURE SelectAllCustomers
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The following SQL creates a stored procedure named "SelectAllCustomers" that selects all records from the "Customers" table:
A stored procedure is a prepared SQL code that you can save, so the code can be reused over and over again.
The CREATE PROCEDURE command is used to create a stored procedure.

Create Procedure

The CREATE PROCEDURE command is used to create a stored procedure.

A stored procedure is a prepared SQL code that you can save, so the code can be reused over and over again.

The following SQL creates a stored procedure named "SelectAllCustomers" that selects all records from the "Customers" table:

Example

CREATE PROCEDURE SelectAllCustomers
AS
SELECT * FROM Customers
GO;

Execute the stored procedure above as follows:

Example

EXEC SelectAllCustomers;

Previous

SQL CREATE TABLE Keyword

Next

SQL CREATE UNIQUE INDEX Keyword