开发者

Is there a metadata table(s) in oracle that stores user defined types?

开发者 https://www.devze.com 2023-02-22 00:10 出处:网络
If someone does so开发者_高级运维mething like: CREATE OR REPLACE TYPE some_type AS OBJECT(whatever NUMBER);

If someone does so开发者_高级运维mething like:

CREATE OR REPLACE TYPE some_type AS OBJECT(whatever NUMBER);

and then I do something like:

SELECT type_name FROM some_magic_table WHERE type_name = 'some_type';

should i reasonably expect oracle to work like this?

I don't wish to rely on Oracle SQL Developer interface to eyeball types all the time, that's why.

I am using 10g btw.

Thanks.


Yes, it is called USER_TYPES (I guess a SYS view).

Try this(if the type was created by the schema/user running this query):

SELECT * 
  FROM user_types 
 WHERE type_name = 'SOME_TYPE'; 

To look into TYPES that you have access to irrespetive of the schema:

SELECT * 
  FROM all_types 
 WHERE type_name = 'SOME_TYPE'; 


--
-- The types
--
SELECT *
FROM   ALL_TYPES

--
-- Their attributes
--
SELECT *
FROM   ALL_TYPE_ATTRS
0

精彩评论

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