(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 MyTable (Name, ID)
VALUES ('First',1), ('Second',2), ('Third',3)
However, it seems like this syntax DOES NOT work in Sybase Adaptive Server Enterprise, since this gives me an error..
Anyone know the syntax in Sybase that achieves the same thing?
Sybase ASE is based on Transact SQL..
Thanks
Looks like that syntax is not valid in Sybase ASE but as suggested in the linked SO post you can get the same using
UNION ALL
liketry this:
I know this works on older versions of SQL server, and suspect that it will work with sybase.
Sybase doen't have insert syntax as SQL Server. What's wrong with showed below classic method?