`
aaron_ch
  • 浏览: 177373 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

Create simple table in Oracle

阅读更多

CREATE TABLE COTS_TAB_BENE_LOOKUP_CODE(
  BRANCH         VARCHAR2(3  BYTE)              NOT NULL,
  MSGTYPE        VARCHAR2(50 BYTE)              NOT NULL,
  PARAM          VARCHAR2(30 BYTE)              NOT NULL,
  VALUE          VARCHAR2(70 BYTE)                      ,  
  ACTIVE_IND     VARCHAR2(1  BYTE)              NOT NULL,
  COTS_UPD_DATE  DATE                                   ,
  COTS_UPD_BY    VARCHAR2(18 BYTE)   
  --REMARK         VARCHAR2(30 BYTE)                    --(E FOR EMAIL,F FOR FAX)    
)


--INDEX
CREATE UNIQUE INDEX COTS_PK_BENE_LOOKUP_CODE ON COTS_TAB_BENE_LOOKUP_CODE(BRANCH,MSGTYPE,PARAM);


--PRIMARY KEY
ALTER TABLE COTS_TAB_BENE_LOOKUP_CODE ADD (
  CONSTRAINT COTS_PK_BENE_LOOKUP_CODE
 PRIMARY KEY(BRANCH, MSGTYPE, PARAM)

)
 

CREATE PUBLIC SYNONYM COTS_TAB_BENE_LOOKUP_CODE FOR COTS_TAB_BENE_LOOKUP_CODE;

GRANT DELETE, INSERT, SELECT, UPDATE ON COTS_TAB_BENE_LOOKUP_CODE TO RCOT_APPS_ROLE;

GRANT SELECT ON COTS_TAB_BENE_LOOKUP_CODE TO RCOT_SELECT_ROLE;


--- Insert data to table,FOR EPO_FTBENE
 
  INSERT INTO COTS_TAB_BENE_LOOKUP_CODE VALUES(712,'FTBNADV','SOURCESYSTEM','FFTI','A','','')
  INSERT INTO COTS_TAB_BENE_LOOKUP_CODE VALUES(712,'FTBNADV','COTSUPDBY','BENEADVISING','A','','')
  INSERT INTO COTS_TAB_BENE_LOOKUP_CODE VALUES(712,'FTBNADV','DIR','/ucotreg1/wrk/output/712/','A','','')
  INSERT INTO COTS_TAB_BENE_LOOKUP_CODE VALUES(712,'FTBNADV','DELIVERYMEDIA','FAX','A','','')
  INSERT INTO COTS_TAB_BENE_LOOKUP_CODE VALUES(712,'FTBNADV','DELIVERYSTATUS','GENERATED','A','','')
  INSERT INTO COTS_TAB_BENE_LOOKUP_CODE VALUES(712,'FTBNADV','FILENAME_EMAILMSG','','A','','')

  SELECT * FROM COTS_TAB_BENE_LOOKUP_CODE WHERE BRANCH=712 AND MSGTYPE='FTBNADV'

--- INSERT DATA TO TABLE,FOR EMAIL BENE ADV,HONGYI WILL UPDATE....

分享到:
评论

相关推荐

    Oracle.Application.Express.Administration.For.DBAs.and.Developers.epub

    It’s a tool with a fast-growing user-base as developers come to know how quick and easy it is to create new applications that run in a browser. However, just getting an application off the ground is...

    Expert Oracle Database Architecture 3rd

    Tom Kyte and Darl Kuhn share a simple philosophy: "you can treat Oracle as a black box and just stick data into it, or you can understand how it works and exploit it as a powerful computing ...

    Apress.Expert.Oracle.Database.Architecture.2nd.Edition

    Tom has a simple philosophy: you can treat Oracle as a black box and just stick data into it or you can understand how it works and exploit it as a powerful computing environment. If you choose the ...

    Python库 | simple_ddl_parser-0.19.6-py3-none-any.whl

    CREATE TABLE users ( id INT PRIMARY KEY, name VARCHAR(50), email VARCHAR(255) UNIQUE ); """ parser = DDLParser() parsed_ddl = parser.parse(ddl) # parsed_ddl现在是一个包含解析后的数据库结构的对象 ...

    Oracle 10g 学习笔记

    │ createTable.sql │ ├─07 视图 │ view.sql │ ├─08 序列同义词 │ sequence.sql │ ├─09 用户管理 │ user.jpg │ user.sql │ ├─10 嵌套表 可变数组 │ createType.sql │ ├─11 PLSQLl语法 │ ...

    easyload 9.0

    Create Table MAPINFO_MAPCATALOG ( SPATIALTYPE Float, TABLENAME Char(32), OWNERNAME Char(32), SPATIALCOLUMN Char(32), DB_X_LL Float, DB_Y_LL Float, DB_X_UR Float, DB_Y_UR Float, COORDINATESYSTEM Char...

    疯狂SQL之魔兽争霸 .txt

    - **Oracle**: 使用`CREATE GLOBAL TEMPORARY TABLE`来创建临时表。 例如,在SQL中创建临时表的方式如下: ```sql CREATE TABLE #TEMP (ID INT, NAME VARCHAR(20)); ``` 而在Oracle中,对应的创建临时表语句为: ...

    java中xml文件的处理及oracle中xmltype的插入和读取.pdf

    Java 中 XML 文件的处理及 Oracle 中 ...11. Oracle 中可以使用 CREATE TABLE 语句来创建一个表,并将其设置为存储 XML 文件。 12. Oracle 中可以使用 DIRECTORY 语句来创建一个目录,并将其设置为存储 XML 文件。

    Python库 | simple_ddl_parser-0.19.4-py3-none-any.whl

    ddl_statements = parser.parse('CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(50));') # 然后可以对解析结果进行进一步的操作 for stmt in ddl_statements: print(stmt) ``` `simple_ddl_parser` 库的...

    DBEntry.Net 参考手册

    Auto create table Anti sql injection Multiple data source Object validation Paged selector and collection Nullable support DbEntryDataSource ASP.NET 2.0 Membership support Built-in Cache ...

    深入浅析mybatis oracle BLOB类型字段保存与读取

    CREATE TABLE BLOB_FIELD ( ID VARCHAR2(64 BYTE) NOT NULL, TAB_NAME VARCHAR2(64 BYTE) NOT NULL, TAB_PKID_VALUE VARCHAR2(64 BYTE) NOT NULL, CLOB_COL_NAME VARCHAR2(64 BYTE) NOT NULL, CLOB_COL_VALUE ...

    创建Oracle函数的示例

    CREATE OR REPLACE FUNCTION simple_function(p_input NUMBER) RETURN NUMBER IS l_result NUMBER; BEGIN l_result := p_input * 2; RETURN l_result; END simple_function; / ``` 在这个例子中,我们创建了一个...

    JDBC.rar_jdbc_simple bbs jdbc

    CREATE TABLE Users ( id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL ); ``` - **帖子表**:创建一个帖子表存储主题、内容、作者ID等。 ```sql ...

    quartz 持久化数据库表结构sql

    CREATE TABLE QRTZ_JOB_DETAILS ( SCHED_NAME VARCHAR(120) NOT NULL, JOB_NAME VARCHAR(200) NOT NULL, JOB_GROUP VARCHAR(200) NOT NULL, DESCRIPTION VARCHAR(250) DEFAULT NULL, JOB_CLASS_NAME VARCHAR...

    webserviceyuoracle

    使用`CREATE INDEX`语句创建索引,查询时系统会自动利用索引来优化查询路径。 12. **索引与查询性能**: 索引并不总是提高查询性能,对于全表扫描和小表,索引可能不必要。此外,过多的索引可能导致写操作变慢。 ...

    ORCAL存储过程(二)

    首先,通过`CREATE TABLE`语句创建了一个名为`DEPT`的表,包含三列: - `D_NO`:部门编号,类型为`CHAR(2)` - `D_NAME`:部门名称,类型为`VARCHAR2(10)` - `D_DATE`:日期,类型为`DATE` #### 存储过程定义 `sp_...

    VB编程资源大全(英文源码 数据库)

    <END><br>47,DataCntl.zip Simple application that shows how to use the Data Control to connect to the Biblio.mdb database and display all authors in the Authors table. <END><br>48,MyTool.zip An ...

    quartz创建表sql

    你需要在MySQL数据库中运行对应的CREATE TABLE语句。MySQL的语法可能与Oracle有所不同,例如字段类型或约束条件的写法。确保根据MySQL的语法调整SQL脚本。 三、DB2数据库创建Quartz表 在DB2环境中,同样需要执行一...

    PLSQL最佳实践

    - 示例:`LOOP DBMS_OUTPUT.PUT_LINE('Simple loop.'); EXIT WHEN v_counter > 10; v_counter := v_counter + 1; END LOOP;` **3.12.2 FOR循环** - 示例:`FOR i IN 1..10 LOOP DBMS_OUTPUT.PUT_LINE('FOR loop: ' ...

    sql数据库新政策执行

    在SQL中,`CREATE TABLE`语句用于创建一个新的数据库表。例如,创建一个包含ID、姓名和密码字段的`person`表: ```sql CREATE TABLE person ( id VARCHAR(32) NOT NULL PRIMARY KEY, name VARCHAR(20), password ...

Global site tag (gtag.js) - Google Analytics