Inserting Multiple Rows in Sybase Ase

How can I insert multiple records with a single INSERT statement in Sybase ASE

Your first Sybase doc link is ASA not ASE documentation.
In ASE you can insert multiple rows only with insert - select statement.

How to do multiple inserts into sybase from c# at once

I figured out there is no need for ; or GO. Thanks a lot for the input

Insert multiple rows WITHOUT repeating the INSERT INTO ... part of the statement?

INSERT INTO dbo.MyTable (ID, Name)
SELECT 123, 'Timmy'
UNION ALL
SELECT 124, 'Jonny'
UNION ALL
SELECT 125, 'Sally'

For SQL Server 2008, can do it in one VALUES clause exactly as per the statement in your question (you just need to add a comma to separate each values statement)...

SQL How could i add MULTIPLE DATA from an if not exist?

Is this what you want?

insert into #TESTINT (Cre_Numero)
select a.Cre_Numero
from ABCOTIZA a
where a.Cot_NomArr <> 'Pago';


Related Topics



Leave a reply



Submit