Increase column by 1

Posted on 2005-04-18
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.

Question by:natejacobs
    LVL 28

    Accepted Solution

    CREATE PROCEDURE DecreaseQuantity  @RecordID INT
    UPDATE YourTable
    SET Quantity = Quantity - 1
    WHERE YourID = @RecordID
    LVL 3

    Author Comment

    Thanks rafrancisco.  I'm SQL challenged!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    The steps for moving the system databases to a new location are documented in the following technical article: However sometimes after the moving process is finished, though SQL i…
    Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now