开发者

get schema name

开发者 https://www.devze.com 2023-03-02 10:50 出处:网络
can some one pls tell me how to get the \'schema name\' for a particular \'sequen开发者_JS百科ce\' using jdbcI assume you are using Oracle DB.

can some one pls tell me how to get the 'schema name' for a particular 'sequen开发者_JS百科ce' using jdbc


I assume you are using Oracle DB.
If that's the case you can run the query given below via JDBC and get the column named sequence_owner for the Schema Name to which a sequence belongs to.

SELECT sequence_owner
  FROM all_sequences
 WHERE sequence_name = '<YOUR_SEQUENCE_NAME>'


select SCHEMA_NAME from INFORMATION_SCHEMA.SCHEMATA

This is return all schema names.

0

精彩评论

暂无评论...
验证码 换一张
取 消