Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get information about a User-Defined Type?

In simplicity, PL/SQL generally follow the following:

DECLARE 
     Variable declaration
BEGIN 
     Program Execution 
EXCEPTION 
     Exception handling
END;

I am quite new to PL/SQL and i am looking at the variable declaration section where i would like to find out more information on SALES_PRODUCT_TY_LIST.

Is there a table i may look up to check on information on SALES_PRODUCT_TY_LIST, such as checking out table column information from all_tab_cols view?

CREATE OR REPLACE PROCEDURE GET_DISCOUNTS
(
  v_have_list SALES_PRODUCT_TY_LIST
)
IS
  QUERY VARCHAR(5000);
...

Thanks.

like image 954
Oh Chin Boon Avatar asked Sep 19 '11 07:09

Oh Chin Boon


People also ask

How can the information for be accessed using user-defined data types?

Class: The building block of C++ that leads to Object-Oriented programming is a Class. It is a user-defined data type, which holds its own data members and member functions, which can be accessed and used by creating an instance of that class.

How do I get a list of user-defined types in SQL Server?

SQL Server supports various data types for storing different kinds of data. These data types store characters, numeric, decimal, string, binary, CLR and Spatial data types. Once you connect to a database in SSMS, you can view these data types by navigating to Programmability-> Types->System Data Types.

Which is the best term to describe user-defined data type?

Hence, the data types that are defined by the user are known as user-defined data types. For example; arrays, class, structure, union, Enumeration, pointer, etc. These data types hold more complexity than pre-defined data types.

Which is the user-defined data type?

A user-defined data type (UDT) is a data type that derived from an existing data type. You can use UDTs to extend the built-in types already available and create your own customized data types. There are six user-defined types: Distinct type.


1 Answers

The Oracle database has an extensive data dictionary (what some other DBMS products call the INFORMATION SCHEMA). You can find all the views here. Alas, the revised ToC structure makes it harder to find something in the 11g documentation unless you already know what you're looking for, so use the index instead. 8-)

Anyway, the views you need to query are ALL_TYPES and ALL_TYPE_ATTRS.

like image 147
APC Avatar answered Oct 01 '22 23:10

APC