insert table error

  • Hi All,

    I have created a table name ##a. It consists of only one column.

    Create table ##a(id int identity(0,2))

    table created successfully.

    I don't know how to insert a values.If Possible can any body reply me..

    Thanks & Regards

    Balaji.G

  • CREATE TABLE ##a(id int identity(0,2))

    INSERT INTO ##a DEFAULT VALUES

    INSERT INTO ##a DEFAULT VALUES

    INSERT INTO ##a DEFAULT VALUES

    INSERT INTO ##a DEFAULT VALUES

    SELECT * FROM ##a

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

  • balaji.ganga (6/14/2010)


    I have created a table name ##a

    Please note this is a Global Temporary Table meaning it will be automatically dropped after:

    a) the session that created the table disconnects; and

    b) the last session referencing this table - other than the session that created it - disconnects.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
  • Thanks for your reply

    Balaji.G

Viewing 4 posts - 1 through 3 (of 3 total)

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