{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Create Stored Procedure example

Create Stored Procedure example - Parameters to...

Info icon This 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.
Image of page 1

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

View Full Document Right 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
Image of page 2
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern