Inserting Multiple Rows in Sybase ASE

后端 未结 4 1473
不知归路
不知归路 2021-01-18 12:11

(Similar question related to SQL Server : SO Link)

I know in Sql Server 2008 or above, you can insert multiple rows doing the following:

INSERT INTO          


        
4条回答
  •  有刺的猬
    2021-01-18 12:38

    try this:

    INSERT INTO MyTable (Name, ID)
    Select 'First',1
    Union All 
    Select 'Second',2
    Union All
    Select 'Third',3
    

    I know this works on older versions of SQL server, and suspect that it will work with sybase.

提交回复
热议问题