Insert multiple rows into single column

前端 未结 9 1696
抹茶落季
抹茶落季 2020-12-24 07:29

I\'m new to SQL, (using SQL 2008 R2) and I am having trouble inserting multiple rows into a single column.

I have a table named Data and this is what I

9条回答
  •  天涯浪人
    2020-12-24 08:02

    Kindly ensure, the other columns are not constrained to accept Not null values, hence while creating columns in table just ignore "Not Null" syntax. eg

    Create Table Table_Name(
                col1 DataType,
                col2 DataType);
    

    You can then insert multiple row values in any of the columns you want to. For instance:

    Insert Into TableName(columnname)
    values
          (x),
          (y),
          (z);
    

    and so on…

    Hope this helps.

提交回复
热议问题