Java 获取Oracle ROWID
2011-08-28 15:02
246 查看
A ROWID is an identification tag unique for each row of an Oracle Database table. The ROWID can be thought of as a virtual column, containing the ID for each row.
The oracle.sql.ROWID class is supplied as a container for ROWID SQL data type.
If you include the ROWID pseudo-column in a query, then you can retrieve the ROWIDs with the result set getString method. You can also bind a ROWID to a PreparedStatement parameter with the setString method. This enables in-place updating, as in the example that follows.
Note: Use the oracle.sql.ROWID class, only when you are
using J2SE 1.5. For JSE 6, you should use the standard
java.sql.RowId interface instead.
The oracle.sql.ROWID class is supplied as a container for ROWID SQL data type.
If you include the ROWID pseudo-column in a query, then you can retrieve the ROWIDs with the result set getString method. You can also bind a ROWID to a PreparedStatement parameter with the setString method. This enables in-place updating, as in the example that follows.
Note: Use the oracle.sql.ROWID class, only when you are
using J2SE 1.5. For JSE 6, you should use the standard
java.sql.RowId interface instead.
ResultSet rst = stmt.executeQuery("select rowid,name from friend"); ... String rowid=rst.getString(1); ... //or RowId rowid = rst.getRowId(1); // Get the ROWID as a String
相关文章推荐
- Oracle获取Oracle rowid信息的存储过程
- java获取整个数据表中的数据(Oracle)
- Java实时获取oracle变更
- java call Oracle procedure 获取返回值
- Oracle Procedure (PL/SQL) 实践归纳(3)之在Java利用Procedure获取结果集
- Java获取Oracle中CLOB字段转换成String
- Java获取Oracle中CLOB字段转换成String
- Java获取Oracle中CLOB字段转换成String
- java获取oracle中CLOB字段,转换成String
- java解析oracle日志,获取指定日期后的更新和插入数据
- java程序调用Oracle 存储过程 获取返回值(无返回,非结果集,结果集)
- java获取Oracle和access数据库结构
- 解决java获取oracle数据库值时丢失小数点前面的0
- JAVA,jsp,oracle获取系统当前时间以及日期格式转换!
- 关于java获取Oracle中date类型字段问题
- java获取某个oracle序列的当前最大值
- java中的反射 2.1——类:获取类对象@译自Oracle官方文档
- java获取sql,oracle的字段详细信息(字段类型,长度,精度)
- JAVA获取oracle中sequences的最后一个值
- JAVA结合Oracle的Database Change Notification实现替代获取实时数据需要的刷库操作