Stored Procedures

  • Hi

    Can you tell me some complex stored procedures for insert update and delete and please also tell me can we write one stored procedure for insert and update

  • yes, a stored procedure can do inserts, updates, deletes and selects!!

  • Thank you for the reply yes i know about the simple procedures i need some complex procedures for insert update and delete. where multiple functionality can be done.

  • rahuldhawan2007 (6/16/2012)


    Thank you for the reply yes i know about the simple procedures i need some complex procedures for insert update and delete. where multiple functionality can be done.

    I guess I'm not understanding your question, are you wanting someone to write some stored procedures for you to do inserts, updates and deletes? If so, we'll need to know about your database tables and columns.

    You might want to try googling "how to write a complex stored procedure that uses multiple statements on microsoft sql server" We'll be glad to help if you are having difficultly creating your own stored procedures, but you haven't really given us anywhere to start.

  • rahuldhawan2007 (6/15/2012)


    Hi

    Can you tell me some complex stored procedures for insert update and delete and please also tell me can we write one stored procedure for insert and update

    Absolutely. You could start by looking at some of the stored procedures that MS wrote for SQL Server. For example (although they're not a good examples of how to write a stored procedure), take a look at the sp_SpaceUsed and the sp_MSforeachtable system stored procedures in the Master database.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • define complicated, what i may think is complicated other may think simple download adventure works database and have a look in there

    ***The first step is always the hardest *******

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply