[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Increase column by 1

Posted on 2005-04-18
2
Medium Priority
?
211 Views
Last Modified: 2010-03-19
Can someone help me out with a fairly simple Stored Procedure?

I need a sp that simply decreases the Quantity column by 1 for a given record.

Thanks.
0
Comment
Question by:natejacobs
2 Comments
 
LVL 28

Accepted Solution

by:
rafrancisco earned 1000 total points
ID: 13806447
CREATE PROCEDURE DecreaseQuantity  @RecordID INT
AS
UPDATE YourTable
SET Quantity = Quantity - 1
WHERE YourID = @RecordID
0
 
LVL 3

Author Comment

by:natejacobs
ID: 13806472
Thanks rafrancisco.  I'm SQL challenged!
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question