高分悬赏

jill_yang 2000-07-26 12:41:00
如何把LONG型数据从一个库中的一个表,导入到另一个库中的一个表
...全文
212 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Tyro 2000-07-26
  • 打赏
  • 举报
回复
太简略了吧,怎么也该说得详细点呀!
zzh 2000-07-26
  • 打赏
  • 举报
回复
最简单的方法就是复制粘贴了,当然,如果你想写程序,编一段代码也可以啊。
Tommy Chang 2000-07-26
  • 打赏
  • 举报
回复
Within a single SQL statement, all LONG columns, updated tables, and locked tables must be located on the same database.

这是官方文档找到的,连oracle都希望你放弃long,转成lob
全文如下:

LONG Datatype
LONG columns store variable-length character strings containing up to 2 gigabytes, or 231-1 bytes. LONG columns have many of the characteristics of VARCHAR2 columns. You can use LONG columns to store long text strings. The length of LONG values may be limited by the memory available on your computer.


--------------------------------------------------------------------------------
Note:
Oracle Corporation strongly recommends that you convert LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. For more information, see "TO_LOB".

--------------------------------------------------------------------------------




You can reference LONG columns in SQL statements in these places:

SELECT lists

SET clauses of UPDATE statements

VALUES clauses of INSERT statements

The use of LONG values is subject to some restrictions:

A table cannot contain more than one LONG column.

You cannot create an object type with a LONG attribute.

LONG columns cannot appear in integrity constraints (except for NULL and NOT NULL constraints).

LONG columns cannot be indexed.

A stored function cannot return a LONG value.

Within a single SQL statement, all LONG columns, updated tables, and locked tables must be located on the same database.

LONG columns cannot appear in certain parts of SQL statements:

WHERE clauses, GROUP BY clauses, ORDER BY clauses, or CONNECT BY clauses or with the DISTINCT operator in SELECT statements

The UNIQUE operator of a SELECT statement

The column list of a CREATE CLUSTER statement

The CLUSTER clause of a CREATE MATERIALIZED VIEW statement

SQL functions (such as SUBSTR or INSTR)

Expressions or conditions

SELECT lists of queries containing GROUP BY clauses

SELECT lists of subqueries or queries combined by set operators

SELECT lists of CREATE TABLE ... AS SELECT statements

SELECT lists in subqueries in INSERT statements

Triggers can use the LONG datatype in the following manner:

A SQL statement within a trigger can insert data into a LONG column.

If data from a LONG column can be converted to a constrained datatype (such as CHAR and VARCHAR2), a LONG column can be referenced in a SQL statement within a trigger.

Variables in triggers cannot be declared using the LONG datatype.

:NEW and :OLD cannot be used with LONG columns.

You can use the Oracle Call Interface functions to retrieve a portion of a LONG value from the database. See Oracle Call Interface Programmer's Guide.

guostong 2000-07-26
  • 打赏
  • 举报
回复
ORACLE的包可以做,给分的话可以给你源代码
jill_yang 2000-07-26
  • 打赏
  • 举报
回复
但对LONG型这样做,ORACLE认为是非法操作,在ORACLE中不支持对LONG型这种操作
haihong 2000-07-26
  • 打赏
  • 举报
回复
huntout这样是不行的。
应该用copy解决
copy from usr/pwd@db to usr/pwd@db insert table2 (name) using select name from table1
huntout 2000-07-26
  • 打赏
  • 举报
回复
select name into databse2..table2 from database1..table1
jill_yang 2000-07-26
  • 打赏
  • 举报
回复
比如TABLE1中有个字段NAME是LONG型,TABLE2里有个字段NAME,要将TABLE1中的NAME的数据导入到TABLE2的NAME中去,如何办?
① 系统环境:Windows/Mac ② 开发语言:Java ③ 框架:SpringBoot ④ 架构:B/S、MVC ⑤ 开发环境:IDEA、JDK、Maven、Mysql ⑥ JDK版本:JDK1.8 ⑦ Maven包:Maven3.6 ⑧ 数据库:mysql 5.7 ⑨ 服务平台:Tomcat 8.0/9.0 ⑩ 数据库工具:SQLyog/Navicat ⑪ 开发软件:eclipse/myeclipse/idea ⑫ 浏览器:谷歌浏览器/微软edge/火狐 ⑬ 技术栈:Java、Mysql、Maven、Springboot、Mybatis、Ajax、Vue等 2、适用人群:计算机,电子信息工程等专业的学习者等, 高分毕业设计项目,也可作为课程设计和期末大作业。本资源仅是代码的压缩包,该代码适合毕业设计、课程设计作业,所有源码均经过严格测试,可以放心下载使用。有任何使用问题欢迎随时与博主沟通,第一时间进行解答! 3、解压说明:本资源需要电脑端使用WinRAR、7zip、Bandizip等解压工具进行解压 4、最新计算机软件毕业设计选题大全 https://blog.csdn.net/weixin_45630258/article/details/135901374 5、系统的实现说明 摘 要 I 目 录 III 第1章 绪论 1 1.1选题动因 1 1.2背景与意义 1 第2章 相关技术介绍 3 2.1 MySQL数据库 3 2.2 Vue前端技术 3 2.3 B/S架构模式 4 2.4 ElementUI介绍 4 第3章 系统分析 5 3.1 可行性分析 5 3.1.1技术可行性 5 3.1.2经济可行性 5 3.1.3运行可行性 6 3.2 系统流程 6 3.2.1 操作信息流程 6 3.2.2 登录信息流程 6 3.2.3 删除信息流程 7 3.3 性能需求 7 第4章 系统设计 8 4.1系统整体结构 8 4.2系统功能设计 9 4.3数据库设计 9 第5章 系统的实现 20 5.1用户信息管理 20 5.2 图片素材管理 20 5.3视频素材管理 21 5.1公告信息管理 22 第6章 系统的测试 24 6.1软件测试 24 6.2测试环境 24 6.3测试测试用例 24 6.4测试结果 25

34,575

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧