关于oracle varchar2 官方文档的描述 VARCHAR2 Data Type The VARCHAR2 data type specifies a variable-length character string. When you create a VARCHAR2 column, you supply the maximum number of bytes or characters of data that it can hold. Oracle subsequently st…
oerr ora 0650206502, 00000, "PL/SQL: numeric or value error%s"// *Cause: An arithmetic, numeric, string, conversion, or constraint error// occurred. For example, this error occurs if an attempt is made to// assign the value NULL to a variable de…
1.错误提示: mysql的Data truncation: Data too long for column 'path' at row 1 错误原因: 1.字段过长而导致出错的, 2. 可能是因为数据库里的表设置的字符集不相同. 解决办法: varchar(10) ——>varchar(20) alter table `cms_activity_test` convert to character set gbk collate gbk_chinese_ci;(单独修改指定表的字符集) 其他…
1.在oracle中 varchar2的最大长度为4000 bytes,即varchar2(4000),最多能储存2000个汉子或4000位的数字字母.当储存值超过时可以使用clob(Character Large Object)或blob(Binary Large Object)类型. 2.使用clob就要有string转换blob的过程:java.sql.Clob c = new javax.sql.rowset.serial.SerialClob(strObj.toCharArray())…
oracle导出excel(非csv)的方法有两种,1.使用sqlplus spool,2.使用包体 现将网上相关代码整理后贴出以备不时之需: 使用sqlplus: 使用sqlplus需要两个文件:sql脚本文件和格式设置文件. 去除冗余信息,main.sql --main.sql 注意,需要在sqlplus下运行 非plsql命令行下 set markup html on entmap ON spool on preformat off spool test_tables.xls @get_…
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jul 14 18:12:38 2009 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> conn sys/sys as sysdba Connected. SQL> show user USER is "SYS" SQL> desc dba_users…
存储过程定义,举个例子如下: create or replace procedure test_person(id in Number, Ename In Varchar2, age In Varchar2, TCS out mytype) Is --TCS为输出游标 IS 为关键字 V_ename ); --临时参数 v_age NUMBER;--临时参数 V_Sql ); tcs1 mytype; begin V_Sql:='';--自定义sql语句 Open tcs1 for V_Sql;…