--PLSQL程序编写杂烦数据表信息编写批量排版
SELECT 'cra.' || lower(t.column_name) ||','
FROM dba_tab_columns t
WHERE t.table_name = 'CUX_REBATE_APPLY'
ORDER BY t.column_id;
--结果
cra.apply_id,
cra.header_id,
cra.line_number,
cra.apply_amount,
cra.apply_method_code,
cra.apply_source_id,
cra.apply_line_num,
cra.oms_flag,
cra.remark,
cra.description,
cra.source_code,
cra.source_line_id,
cra.source_reference,
cra.process_group_id,
cra.process_date,
cra.process_message,
cra.comments,
cra.row_version_number,
cra.creation_date,
cra.created_by,
cra.last_updated_by,
cra.last_update_date,
cra.last_update_login,
cra.program_application_id,
cra.program_id,
cra.program_update_date,
cra.request_id,
cra.attribute_category,
cra.attribute1,
cra.attribute2,
cra.attribute3,
cra.attribute4,
cra.attribute5,
cra.attribute6,
cra.attribute7,
cra.attribute8,
cra.attribute9,
cra.attribute10,
cra.attribute11,
cra.attribute12,
cra.attribute13,
cra.attribute14,
cra.attribute15, SELECT 'l_CUX_INV_LOT_NUMBER.'||lower(t.column_name) || ':= NULL;'
FROM dba_tab_columns t
WHERE t.table_name = 'CUX_INV_LOT_NUMBER'
ORDER BY t.column_id;
--结果
l_CUX_INV_LOT_NUMBER.id:= NULL;
l_CUX_INV_LOT_NUMBER.lot_number:= NULL;
l_CUX_INV_LOT_NUMBER.lot_date:= NULL;
l_CUX_INV_LOT_NUMBER.remark:= NULL;
l_CUX_INV_LOT_NUMBER.description:= NULL;
l_CUX_INV_LOT_NUMBER.source_code:= NULL;
l_CUX_INV_LOT_NUMBER.source_line_id:= NULL;
l_CUX_INV_LOT_NUMBER.source_reference:= NULL;
l_CUX_INV_LOT_NUMBER.process_group_id:= NULL;
l_CUX_INV_LOT_NUMBER.process_status:= NULL;
l_CUX_INV_LOT_NUMBER.process_date:= NULL;
l_CUX_INV_LOT_NUMBER.process_message:= NULL;
l_CUX_INV_LOT_NUMBER.comments:= NULL;
l_CUX_INV_LOT_NUMBER.row_version_number:= NULL;
l_CUX_INV_LOT_NUMBER.creation_date:= NULL;
l_CUX_INV_LOT_NUMBER.created_by:= NULL;
l_CUX_INV_LOT_NUMBER.last_updated_by:= NULL;
l_CUX_INV_LOT_NUMBER.last_update_date:= NULL;
l_CUX_INV_LOT_NUMBER.last_update_login:= NULL;
l_CUX_INV_LOT_NUMBER.program_application_id:= NULL;
l_CUX_INV_LOT_NUMBER.program_id:= NULL;
l_CUX_INV_LOT_NUMBER.program_update_date:= NULL;
l_CUX_INV_LOT_NUMBER.request_id:= NULL;
l_CUX_INV_LOT_NUMBER.attribute_category:= NULL;
l_CUX_INV_LOT_NUMBER.attribute1:= NULL;
l_CUX_INV_LOT_NUMBER.attribute2:= NULL;
l_CUX_INV_LOT_NUMBER.attribute3:= NULL;
l_CUX_INV_LOT_NUMBER.attribute4:= NULL;
l_CUX_INV_LOT_NUMBER.attribute5:= NULL;
l_CUX_INV_LOT_NUMBER.attribute6:= NULL;
l_CUX_INV_LOT_NUMBER.attribute7:= NULL;
l_CUX_INV_LOT_NUMBER.attribute8:= NULL;
l_CUX_INV_LOT_NUMBER.attribute9:= NULL;
l_CUX_INV_LOT_NUMBER.attribute10:= NULL;
l_CUX_INV_LOT_NUMBER.attribute11:= NULL;
l_CUX_INV_LOT_NUMBER.attribute12:= NULL;
l_CUX_INV_LOT_NUMBER.attribute13:= NULL;
l_CUX_INV_LOT_NUMBER.attribute14:= NULL;
l_CUX_INV_LOT_NUMBER.attribute15:= NULL; SELECT lower(t.column_name)||' '||'cux_inv_txn_lot.' || lower(t.column_name)||'%type,'
FROM dba_tab_columns t
WHERE t.table_name = 'CUX_INV_TXN_LOT'
ORDER BY t.column_id;
--结果
detail_id cux_inv_txn_lot.detail_id%type,
line_id cux_inv_txn_lot.line_id%type,
header_id cux_inv_txn_lot.header_id%type,
organization_id cux_inv_txn_lot.organization_id%type,
inventory_item_id cux_inv_txn_lot.inventory_item_id%type,
lot_number cux_inv_txn_lot.lot_number%type,
transaction_quantity cux_inv_txn_lot.transaction_quantity%type,
lot_expiration_date cux_inv_txn_lot.lot_expiration_date%type,
transaction_id cux_inv_txn_lot.transaction_id%type,
remark cux_inv_txn_lot.remark%type,
group_id cux_inv_txn_lot.group_id%type,
description cux_inv_txn_lot.description%type,
source_code cux_inv_txn_lot.source_code%type,
source_line_id cux_inv_txn_lot.source_line_id%type,
source_reference cux_inv_txn_lot.source_reference%type,
process_group_id cux_inv_txn_lot.process_group_id%type,
process_status cux_inv_txn_lot.process_status%type,
process_date cux_inv_txn_lot.process_date%type,
process_message cux_inv_txn_lot.process_message%type,
comments cux_inv_txn_lot.comments%type,
row_version_number cux_inv_txn_lot.row_version_number%type,
creation_date cux_inv_txn_lot.creation_date%type,
created_by cux_inv_txn_lot.created_by%type,
last_updated_by cux_inv_txn_lot.last_updated_by%type,
last_update_date cux_inv_txn_lot.last_update_date%type,
last_update_login cux_inv_txn_lot.last_update_login%type,
program_application_id cux_inv_txn_lot.program_application_id%type,
program_id cux_inv_txn_lot.program_id%type,
program_update_date cux_inv_txn_lot.program_update_date%type,
request_id cux_inv_txn_lot.request_id%type,
attribute_category cux_inv_txn_lot.attribute_category%type,
attribute1 cux_inv_txn_lot.attribute1%type,
attribute2 cux_inv_txn_lot.attribute2%type,
attribute3 cux_inv_txn_lot.attribute3%type,
attribute4 cux_inv_txn_lot.attribute4%type,
attribute5 cux_inv_txn_lot.attribute5%type,
attribute6 cux_inv_txn_lot.attribute6%type,
attribute7 cux_inv_txn_lot.attribute7%type,
attribute8 cux_inv_txn_lot.attribute8%type,
attribute9 cux_inv_txn_lot.attribute9%type,
attribute10 cux_inv_txn_lot.attribute10%type,
attribute11 cux_inv_txn_lot.attribute11%type,
attribute12 cux_inv_txn_lot.attribute12%type,
attribute13 cux_inv_txn_lot.attribute13%type,
attribute14 cux_inv_txn_lot.attribute14%type,
attribute15 cux_inv_txn_lot.attribute15%type,

PLSQL程序编写杂烦数据表信息编写批量排版的更多相关文章

  1. 【mysql元数据库】使用information_schema.tables查询数据库和数据表信息

    概述 对于mysql和Infobright等数据库,information_schema数据库中的表都是只读的,不能进行更新.删除和插入等操作,也不能加触发器,因为它们实际只是一个视图,不是基本表,没 ...

  2. (转)【mysql元数据库】使用information_schema.tables查询数据库和数据表信息 ---数据记录大小统计

    转:https://www.cnblogs.com/ssslinppp/p/6178636.html https://segmentfault.com/q/1010000007268994?_ea=1 ...

  3. 快速将Navicat中数据表信息导出

    1.使用navicat工具  2.新建查询  SELECT COLUMN_NAME 字段名, COLUMN_TYPE 数据类型, DATA_TYPE 字段类型, CHARACTER_MAXIMUM_L ...

  4. GreenPlum 提取数据表信息

    参考: https://www.alberton.info/postgresql_meta_info.html https://my.oschina.net/Kenyon/blog/226600 列信 ...

  5. Oracle 提取数据表信息

    参考: https://www.progress.com/blogs/jdbc-tutorial-extracting-database-metadata-via-jdbc-driver http:/ ...

  6. 【SQL 数据库】将一张数据表信息复制到另一张数据表

    一.MySQL数据库 1.如果目标表存在 INSERT INTO 目标表  SELECT  * FROM 源表; 2.如果目标表不存在 CREATE TABLE 目标表 SELECT * FROM   ...

  7. 用delphiXE7 dbExpress Framework提供的功能获取数据表信息

    uses +  Data.DBXMetaDataNames procedure TMainForm.Button2Click(Sender: TObject);var  Cmd: TDBXComman ...

  8. WCF分布式开发步步为赢(8):使用数据集(DataSet)、数据表(DataTable)、集合(Collection)传递数据

    数据集(DataSet).数据表(DataTable).集合(Collection)概念是.NET FrameWork里提供数据类型,在应用程序编程过程中会经常使用其来作为数据的载体,属于ADO.NE ...

  9. 以面向对象的思想实现数据表的添加和查询,JDBC代码超详细

    以面向对象的思想编写JDBC程序,实现使用java程序向数据表中添加学生信息,并且可以实现给定身份证号查询学生信息或给定准考证号查询学生信息. 创建的数据表如下: CREATE TABLE EXAMS ...

随机推荐

  1. mysql列约束

    列属性(约束)1: 是否允许为空(not null)  --not null不允许为空create table t_1(    a tinyint(3) zerofill not null,    b ...

  2. [Codeforces 750E]New Year and Old Subsequence

    Description 题库链接 给出一个长度为 \(n\) 的仅包含数字的字符串. \(q\) 次询问,每次询问该串 \([a,b]\) 段内删去几个数能够使其不含 \(2016\) 的子串,但存在 ...

  3. 51Nod 1125 交换机器的最小代价

    题目描述: 有N台机器重量各不相等,现在要求把这些机器按照重量排序,重量从左到右依次递增.移动机器只能做交换操作,但交换机器要花费一定的费用,费用的大小就是交换机器重量的和.例如:3 2 1,交换1 ...

  4. AQS

    AQS介绍 AQS,即AbstractQueuedSynchronizer, 队列同步器,它是Java并发用来构建锁和其他同步组件的基础框架. AQS的核心思想是基于volatile int stat ...

  5. Python中模块之os的功能介绍

    Python中模块之os的功能介绍 1. os的变量 path 模块路径 方法:os.path 返回值:module 例如:print(os.path) >>> <module ...

  6. seq2seq-chatbot:200 行代码实现聊天机器人

    Chatbot in 200 lines of code CPU 跑不动 github:https://github.com/zsdonghao/seq2seq-chatbot 更多英文,中文聊天机器 ...

  7. java的迭代器详解

    迭代器的引出 在jdk1.5版本之前是没有 foreach的,然而1.5版本就加上了foreach,而引入的新的foreach功能并不是在jvm上进行改进的因为代价太高,甲骨文工程师想到了一个比较好的 ...

  8. JS 中判断空值 undefined 和 null

    1.JS 中如何判断 undefined JavaScript 中有两个特殊数据类型:undefined 和 null,下节介绍了 null 的判断,下面谈谈 undefined 的判断. 以下是不正 ...

  9. Oracle10g以上sysaux表空间的维护和清理

    SYSAUX表空间在Oracle 10g中引入,其作为SYSTEM表空间的辅助表空间.之前,一些使用独立表空间或系统表空间的数据库组件,现在SYSAUX表空间中存在.通过分离这些组件,减轻了SYSTE ...

  10. 值得珍藏的HTTP协议详解

    转自:http://www.cnblogs.com/li0803/archive/2008/11/03/1324746.html 引言 HTTP是一个属于应用层的面向对象的协议,由于其简捷.快速的方式 ...