通过'With'子句将行插入表中 [英] Insert rows into a table by 'With' clause

查看:68
本文介绍了通过'With'子句将行插入表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个数据库,我使用''With''表子句从中检索每组的前10行。

例如

Hi,

I have a database from which I am retrieving first 10 rows for each group using the ''With'' table clause.
e.g

展开 | 选择 | Wrap | 行号

推荐答案

将数据插入表中的语法保持不变。你刚才在顶部有一个额外的位,你的WITH子句。


顺便说一下,我不认为DB2有row_number()函数。我认为你在错误的论坛。
The syntax for inserting data into a table remains the same. You just now have that extra bit at the top, your WITH clause.

By the way, I don''t think DB2 has a row_number() function. I think you''re in the wrong forum.


你好兔子。


我使用查询工具查询数据库(DB2 for OS400 ),以上查询有效。但是,当我在其上添加插入查询时,它会抛出一个错误。


关键字没有预期。有效代币:(选择价值。
Hi Rabbit.

I m using Query Tool to query the database (DB2 for OS400), and the above query works. However, when I add the insert query on top of it, it throws an error.

Keyword WITH not expected. Valid tokens: ( SELECT VALUES.


请用插页发布代码。


这篇关于通过'With'子句将行插入表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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