adding a Select statement to an existing table

  • I have this table abc. when I script it out it contains Create table and Alter procedure commands.

    Now I want to add a Select statement to this table, so when I script out the next time it should consist of Create table, Alter procedure and the new Select statement

    Is there a way to do this.

    Regards

     

    Atulyan Padmanabhan

     

  • What tool are you using as SSMS doesn't do that by default.

    If it is within SSMS what plugins do you have?

  • no tools

  • Please post screenshots and a walkthrough as by default when you script a table via the gui it only scripts the table.  not the procedures also.

  • Sorry... post removed.  Apparently, I posted to the wrong thread.

    • This reply was modified 4 years, 5 months ago by  Jeff Moden.

    --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)

  • It's not quite clear what you want here. What would the SELECT statement include?

    The scripting engine in SQL Server produces the DDL code for the object, but does not include the data. You can use a bacpac export, which is the table + data, with the Export Data Tier Application option under the Tasks (right click the db name)

  • Jeff, to which article are you referring?

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin wrote:

    Jeff, to which article are you referring?

    Sorry... post removed.  Apparently I replied on the wrong thread.

     

    --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)

  • atulyan.aries wrote:

    no tools

    Ok then... let's reword the question... how are you producing the scripts that you cite in your original post?

    --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)

Viewing 9 posts - 1 through 8 (of 8 total)

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