oracle 中此处列不允许,oracle 此地不允许序列
一个插入语句,这样写报错:此处不允许序列
insert into t_dict_product_mapping(f_dict_id, f_product_code_jifei, f_product_name_jifei)
select s_dict_product_mapping.nextval dictid,gid,gname from t_dw_fltelecomproduct_all a
group by gid,gname
改写成这样既可继续
insert into t_dict_product_mapping(f_dict_id, f_product_code_jifei, f_product_name_jifei)
select s_dict_product_mapping.nextval dictid,gid,gname from (
select gid,gname from t_dw_fltelecomproduct_all a
group by gid,gname
)
报错原因,group by语句中不能是会用序列,详见帮助文档
Restrictions on Sequence Values You cannot use CURRVAL and NEXTVAL in the
following constructs:
■ A subquery in a DELETE, SELECT, or UPDATE statement
■ A query of a view or of a materialized view
■ A SELECT statement with the DISTINCT operator
■ A SELECT statement with a GROUP BY clause or ORDER BY clause --这个就是我遇到的那种情况
■ A SELECT statement that is combined with another SELECT statement with the
UNION, INTERSECT, or MINUS set operator
■ The WHERE clause of a SELECT statement
■ The DEFAULT value of a column in a CREATE TABLE or ALTER TABLE statement
■ The condition of a CHECK constrain
oracle 中此处列不允许,oracle 此地不允许序列相关推荐
- oracle 中此处列不允许,oracle-序列 ora-02287 此处不允许序号
今天在生产数据库执行时报ora-02287 此处不允许序号 类似: SELECT distinct SYS_GUID(), 'Y' ACTIVE, 'N' IsRedBack, 'N' IsInit, ...
- oracle中获取列的值,oracle - Oracle-SQL从具有特定列和值的所有表中获取数据 - SO中文参考 - www.soinside.com...
假设我们有一个表ACCOUNT,其中的CUST_ID列如下:SQL> SELECT OWNER, A.TABLE_NAME, COLUMN_NAME FROM 2 ALL_TAB_COLS A ...
- oracle 列 连续,oracle中某列连续相同值的记录数统计(一个简单的例子)
oracle中某列连续相同值的记录数统计(一个简单的例子) row_number() OVER (PARTITION BY COL1 ORDER BY COL2) 表示根据COL1分组,在分组内部根据 ...
- sql拼接同一字段中的数据_用SQL将Oracle中同一列的多行记录拼接成一个字符
用SQL将Oracle中同一列的多行记录拼接成一个字符串 用SQL将Oracle中同一列的多行记录拼接成一个字符串 [sql] -- 原始数据 -- a 111 -- b 222 -- a ...
- Oracle查询所有序列;[oracle中如何创建表的自增ID(通过序列);oracle sql语句大全
Oracle查询所有序列 oracle sql语句大全 oracle中如何创建表的自增ID(通过序列)
- oracle中如何写函数【oracle技术】
oracle中如何写函数[oracle技术] | 浏览:1377 | 更新:2014-04-29 23:14 | 标签:oracle 在oracle数据开发中函数是必不可少的.函数可以一般是可以完成某 ...
- 【小米校招笔试】在Excel中,列的名称是这样一个递增序列:seq={A、B、C、... Z、AA、AB、AC、... AZ、BA、BB、BC、... BZ、CA、... ZZ、AAA、AAB...
2016年小米校招笔试第一题(成都站) 1 在Excel中,列的名称是这样一个递增序列:seq={A.B.C.... Z.AA.AB.AC.... AZ.BA.BB.BC.... BZ.CA.... ...
- oracle中的列在此处不,为什么列在此处不允许?
type Exception report message Internal Server Error description The server encountered an internal e ...
- Oracle中对列加密的方法
Oracle支持多种列加密方式: 1,透明数据加密(TDE): create table encrypt_col(id int, txt varchar2(100) encrypt using '算法 ...
最新文章
- Oracle 工程师离职并回踩:MySQL 糟糕透顶,强烈推荐 PostgreSQL
- MySQL数据库使用连接更新表中某个字段数据
- 关于Linux服务器配置java环境遇到的问题
- Android SearchView 搜索框
- easyui关机图标_如何在Windows 10中创建关机图标
- 蓝桥杯 历届试题 带分数
- oracle 10046详解,Oracle 10046事件详解
- 回溯算法之全排列问题
- Linux 下开机自动重启脚本
- Page.RegisterClientScriptBlock和Page.RegisterStartupScript有何区别
- 知识图谱入门 ,语义搜索
- spring揭秘 读书笔记 六 bean的一生
- 拓端tecdat|R语言基于线性回归的资本资产定价模型(CAPM)
- JS学习——表单验证
- BT文件分享服务器,bt是什么意思服务(bt资源库)
- MySQL: GTID简介,gtid_executed和gtid_purged概念
- 老罗锤子手机(Smartisan T1)的一些感想
- Mastercam 2017 图形阵列(矩形阵列与环形阵列)
- ServerAgent 报错解决
- Verilog学习笔记(一)