gpt4 book ai didi

Oracle创建表作为带有最大计数条件的选择

转载 作者:行者123 更新时间:2023-12-04 06:09:53 24 4
gpt4 key购买 nike

我遇到了一个Oracle问题,这是我的选择:

create table new_table as 
select
idprod as product_id, descr as description
from old_table p where updateNum = (select max(updateNum) from old_table pp where pp.idprod = p.idprod);

这个查询给了我一个没有解释的一般错误。 SQL Developer说我:

"Error starting at line 7 in command: [...] Error report:
SQL Command: create table
Failed: Warning: execution completed with warning"



但是创建表,里面的数据似乎是正确的。

一些提示?

最佳答案

较旧的SQL Developer版本存在一个错误,该错误使它们在CREATE TABLE之后发出类似的警告:请参阅this OTN Forums post

由于已创建表并使用正确的数据填充了该表,因此CREATE TABLE语句正确。如果要确定,请尝试从SQL * Plus执行该语句。

关于Oracle创建表作为带有最大计数条件的选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5817177/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com