Create Stored Procedure example

Create Stored Procedure example - Parameters to see...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Create a stored procedure to insert data into Product table (from Chapter 7 or 8) Note: QOO and QOH have default of 0, Description has default of To be added later. ProdNum, ProductName, UnitPrice are Not Null must supply values for these 1. In Query window, type following query. Note use of parameters with @ to indicate values that must be supplied.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2. Click Execute button. If get errors, fix and re- execute. If no errors, continue… 3. Right click Programmability and select Refresh. You should see Add_Product procedure. Expand
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Parameters to see @ProdNumber, @Desc, @UnitPrice. 4. Right click Add_Product and select Execute Stored Procedure. When window appears asking for data, enter values into table. 5. Click OK … “ Query Executed Successfully ” should appear at bottom of Execute pane. 6. Verify that new Product was added by running a Select query on Product table. 7. ALTERNATE method of executing procedure: In new Query window, enter following and press Execute to run. execute Add_Product '31235', 'Second product', 1.45...
View Full Document

This note was uploaded on 09/21/2011 for the course COP 3330 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Page1 / 3

Create Stored Procedure example - Parameters to see...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online