locked
Entering data in a newly created table RRS feed

  • Question

  • How do I enter data in a table I have just created? Right-clicking, I do not see options that will get me to start testing some data to ensure constraints and defaults. Thank you.
    Monday, June 14, 2010 6:09 PM

Answers

  • OPEN TABLE option is available when using SQL Server Management Studio (SSMS) 2005. But in SSMS 2008 (an I'm assuming R2) the options are "Select Top X Rows" and  "Edit Top Y Rows". That X and Y can be configured under Tools >> Options.
    Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
    Monday, June 14, 2010 6:55 PM
  • David

    You can right click on the object and Script table AS for INSERT and then just add  the values ..

    INSERT INTO tbl (col1,col2)

    VALUES ('blblblb',20)

    Tuesday, June 15, 2010 5:38 AM

All replies

  • OPEN TABLE option is available when using SQL Server Management Studio (SSMS) 2005. But in SSMS 2008 (an I'm assuming R2) the options are "Select Top X Rows" and  "Edit Top Y Rows". That X and Y can be configured under Tools >> Options.
    Todd C - MSCTS SQL Server 2005 - Please mark posts as answered where appropriate.
    Monday, June 14, 2010 6:55 PM
  • Thanks for help. When I do that there are no rows shown, just column names included in brackets. When I use a CompanyName bracket (a category in a column) and try to make up a name for a company, it  says 'invalid syntax'. What could be wrong with it?
    Monday, June 14, 2010 9:56 PM
  • David

    You can right click on the object and Script table AS for INSERT and then just add  the values ..

    INSERT INTO tbl (col1,col2)

    VALUES ('blblblb',20)

    Tuesday, June 15, 2010 5:38 AM
  • David

    You can right click on the object and Script table AS for INSERT and then just add  the values ..

    INSERT INTO tbl (col1,col2)

    VALUES ('blblblb',20)

    Tuesday, June 15, 2010 5:38 AM