Data Providers
Microsoft Azure SQL

Database Scripts

6min


The following Azure SQL scripts create the customer table and store the procedures used in the examples in this section. These scripts should be executed against an existing database in your Azure SQL environment.

Create Customer Table

The following script creates a sample customer table in Microsoft Azure SQL.

createCustomers.sql


Insert sample records in the Customer table

The following script inserts sample customers into the table.

insertCustomer.sql


Stored procedure for selecting a list of customers

The following script creates a store procedure that will return all the customers in the customer table.

sp_GetAllCustomers.sql


Stored procedure for selecting one customer

The following script will create a store procedure to return a single customer record for the provided customer id.

sp_GetCustomerById.sql


Stored procedure for creating or updating a customer record

The following script creates a stored procedure that will add a new customer record if the customer id does not exist. It will update an existing customer if the id does exist.

sp_InsertOrUpdateCustomer.sql