--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. 微信小程序开发•模块化

    微信小程序的MINA框架,其实是许多前端开发技术的组合.这篇文章中,我们来简单地讨论一下模块化. 1.模块化标准 玩前端的同学大部分都知道模块化的几个标准,CommonJs / AMD / CMD.这 ...

  2. [SDOI2016]排列计数

    Description 求有多少种长度为 n 的序列 A,满足以下条件: 1 ~ n 这 n 个数在序列中各出现了一次 若第 i 个数 A[i] 的值为 i,则称 i 是稳定的.序列恰好有 m 个数是 ...

  3. [HNOI2008]神奇的国度

    题目描述 K国是一个热衷三角形的国度,连人的交往也只喜欢三角原则.他们认为三角关系:即AB相互认识,BC相互认识,CA相互认识,是简洁高效的.为了巩固三角关系,K国禁止四边关系,五边关系等等的存在. ...

  4. ●BZOJ 2588 Spoj 10628. Count on a tree

    题链: http://www.lydsy.com/JudgeOnline/problem.php?id=2588 题解: 主席树,在线,(求LCA)感觉主席树真的好厉害...在原树上建主席树.即对于原 ...

  5. bzoj3211花神游历各国 线段树

    3211: 花神游历各国 Time Limit: 5 Sec  Memory Limit: 128 MBSubmit: 4252  Solved: 1547[Submit][Status][Discu ...

  6. Python Socket第二篇(socketserver)

    本节内容 socketserver基础知识 ThreadingTCPServer源码剖析 1.socketserver基础 ThreadingTCPServer实现的Soket服务器内部会为每个cli ...

  7. Java内存分配、管理小结

    转载自:http://java-mzd.iteye.com/blog/848635

  8. 解决 APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tas

    报错信息:APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks! 在网上查了一下,大部分网友分析是c ...

  9. jquery easyui datagrid设置可编辑行的某个列不可编辑

    function onClickRowd(index1, field1) { if (editIndexd != index1) { if (endEditing()) { $('#dg').data ...

  10. oracle初试、函数、增删改查、多表查询

      安装oracle后的测试以及解锁账户                  安装后打开命令行,输入 sqlplus 回车后会提示输入用户名,输入 sys或者system 回车后输入密码,密码为安装or ...