one possible source
http://searchsqlserver.tec
or google for "SQL Server 2008 T-SQL Stored Procedures Tutorial"
Good Luck in your learning
Main Topics
Browse All TopicsBy using this table:
CREATE TABLE Part (
Partid int IDENTITY PRIMARY KEY,
Supplierid int NOT NULL
REFERENCES Part (PartID),
Description VARCHAR (25) NOT NULL,
Count int NOT NULL,
Class VARCHAR (5) NOT NULL,
Inspection smalldatetime NOT NULL);
Write a SQL statement that creates a stored procedure that adds a new record to the Part table, and returns the value of
the newly created PartID PK in an out parameter. The field values of the record to be added should be passed into the
stored proc as input parameters. The assumption here is that the Part table has its PartID PK field as an idendity field,
or surrogate PK, meaning a numeric field that is auto-generated by the db system.
This is what I have come up with:
CREATE PROCEDURE spSuppliers
@Partid int PRIMARY KEY OUTPUT
However after that I am lost. Is there tutorials or web sites that may help me on completing this sql statement?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
one possible source
http://searchsqlserver.tec
or google for "SQL Server 2008 T-SQL Stored Procedures Tutorial"
Good Luck in your learning
melissa0901,
Given this is homework as was established in the other question, it is always good to advise the Experts. Apart from abiding by the academic honesty portion of the MA, hopefully it will indicate to the Experts involved to guide you to understanding of the solution versus just giving it to you since the more you learn the better off you are than us just doing your homework for you.
With that being said, again I would break the pieces of the question up in numbered bullets to ensure you hit every part like a checklist for yourself.
Business Accounts
Answer for Membership
by: pratima_mcsPosted on 2009-11-01 at 23:10:54ID: 25717498
SELECT @@IDENTITY
will return Part id
Select allOpen in new window