oracle系统视图更新,针对 Oracle 表和视图的插入、更新、删除和选择操作

对目标表或视图执行 Insert 操作。Performs an Insert operation on the target table or view. Insert 操作支持将多个记录或大容量插入目标表或视图:The Insert operation supports multiple record or bulk inserts into the target table or view:

-多个记录插入操作基于提供的记录集向表或视图中插入行。- A multiple record Insert operation inserts rows into a table or view based on a supplied record set.

-大容量插入操作基于提供的 SQL SELECT 查询和列列表将行插入到表或视图中。- A bulk Insert operation inserts rows into a table or view based on a supplied SQL SELECT query and column list. 查询返回的记录将基于列列表插入目标表中。The records that the query returns are inserted into the target table based on the column list.

插入操作的返回值是插入的行数。The return value for an Insert operation is the number of rows inserted.

注意: 不能在同一消息中组合多个记录插入和大容量插入。Note: Both multiple-record insert and bulk insert cannot be combined in the same message.

InlineValueInlineValue

对于多个记录插入操作中的所有简单数据记录,可以选择通过指定名为 InlineValue 的可选属性的值来覆盖记录的值。For all simple data records in a multiple record Insert operation, you can choose to override the value of a record by specifying a value for an optional attribute called InlineValue. InlineValue 属性可用于将计算值插入到表或视图中,例如使用序列填充主键列或使用 SYSDATE) 将系统日期插入 (日期列。The InlineValue attribute can be used to insert computed values into tables or views such as populating the primary key column using a sequence or inserting system date (using SYSDATE) into a date column. 例如,在以下 INSERT 语句中:For example, in the following INSERT statement:

10001John15002008-06-21T15:52:19

尽管 "21T15:52: 19" 已指定为 TRANSDATE 列的值,但 InlineValue 特性的值 "SYSDATE" (系统日期) 将插入目标表中。Even though “2008-06-21T15:52:19” is specified as a value for the TRANSDATE column, the value of the InlineValue attribute, “SYSDATE,” (system date) will be inserted into the target table.

使用 InlineValue 属性时:While using the InlineValue attribute:

-避免对 InlineValue 属性使用常量值。- Avoid using constant values for the InlineValue attribute. 例如,在 INSERT 语句中,如果指定,则 会导致错误。For example, in the INSERT statement, if you specify then it will result in an error. 这是因为,InlineValue 属性的值按原样传递到 Oracle,在这种情况下, John 传递到 oracle 数据库,这不是预期值 (预期值为 "John") 。This is because the value of the InlineValue attribute is passed on as-is to Oracle, and in this case John is passed to the Oracle database, which is not the expected value (expected value is ‘John’). 必须在雇员姓名两侧使用单引号。You would have to use single quotes around the employee name. 例如:。For example: .

-如果要对 InlineValue 属性使用 select 查询,则必须将 SELECT 语句括在括号中,并确保 select 查询仅提取一条记录。- If you want to use a select query for the InlineValue attribute, you must enclose the SELECT statement in parentheses and also ensure that the select query fetches only a single record. 例如:。For example: .

注意: 如果在 Oracle 数据库中将元素标记为 NOT NULL,则必须指定该元素的值,即使已指定内联值也是如此。Note: If an element is marked as NOT NULL in the Oracle database, you must specify a value for that element even if you have specified an inline value. 否则,将导致架构验证失败。Failing to do this will cause the schema validation to fail.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值