在Sybase ASE中插入多行 [英] Inserting Multiple Rows in Sybase ASE

查看:113
本文介绍了在Sybase ASE中插入多行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(与SQL Server相关的类似问题: SO链接

(Similar question related to SQL Server : SO Link)

我知道在Sql Server 2008或更高版本中,您可以插入多行执行以下操作:

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)

但是,这种语法在Sybase Adaptive Server Enterprise中不起作用,因为这会给我一个错误。

However, it seems like this syntax DOES NOT work in Sybase Adaptive Server Enterprise, since this gives me an error..

有人知道Sybase中实现相同功能的语法吗?

Anyone know the syntax in Sybase that achieves the same thing?

Sybase ASE基于Transact SQL。

Sybase ASE is based on Transact SQL..

谢谢

推荐答案

Sybase没有作为SQL Server的插入语法。下面显示的经典方法有什么问题?

Sybase doen't have insert syntax as SQL Server. What's wrong with showed below classic method?

INSERT INTO MyTable (Name, ID) VALUES ('First',1)
INSERT INTO MyTable (Name, ID) VALUES ('Second',2)
INSERT INTO MyTable (Name, ID) VALUES ('Third',3)
go

这篇关于在Sybase ASE中插入多行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆