How to retrieve view column type?

I know how to retrieve column names and comments from
table all_col_comments.But I don't know retrieving view column type.If somebody know please help.

ALL_TAB_COLUMNS
ALL_TAB_COLUMNS describes the columns of the tables, views, and clusters accessible to the current user. To gather statistics for this view, use the SQL ANALYZE statement or the DBMS_STATS package.
Related Views
DBA_TAB_COLUMNS describes the columns of all tables, views, and clusters in the database.
USER_TAB_COLUMNS describes the columns of the tables, views, and clusters owned by the current user. This view does not display the OWNER column.
Column Datatype NULL Description
OWNER
VARCHAR2(30)
NOT NULL
Owner of the table, view, or cluster
TABLE_NAME
VARCHAR2(30)
NOT NULL
Name of the table, view, or cluster
COLUMN_NAME
VARCHAR2(30)
NOT NULL
Column name
DATA_TYPE
VARCHAR2(30)
Datatype of the column
DATA_TYPE_MOD
VARCHAR2(3)
Datatype modifier of the column
DATA_TYPE_OWNER
VARCHAR2(30)
Owner of the datatype of the column
DATA_LENGTH
NUMBER
NOT NULL
Length of the column in bytes
DATA_PRECISION
NUMBER
Decimal precision for NUMBER datatype; binary precision for FLOAT datatype, null for all other datatypes
DATA_SCALE
NUMBER
Digits to right of decimal point in a number
NULLABLE
VARCHAR2(1)
Specifies whether a column allows NULLs. Value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY.
COLUMN_ID
NUMBER
NOT NULL
Sequence number of the column as created
DEFAULT_LENGTH
NUMBER
Length of default value for the column
DATA_DEFAULT
LONG
Default value for the column
NUM_DISTINCT
NUMBER
These columns remain for backward compatibility with Oracle7. This information is now in the TAB_COL_STATISTICS views. This view now picks up these values from HIST_HEAD$ rather than COL$.
LOW_VALUE
RAW(32)
HIGH_VALUE
RAW(32)
DENSITY
NUMBER
NUM_NULLS
NUMBER
Number of nulls in the column
NUM_BUCKETS
NUMBER
The number of buckets in histogram for the column
Note: The number of buckets in a histogram is specified in the SIZE parameter of the SQL statement ANALYZE. However, Oracle does not create a histogram with more buckets than the number of rows in the sample. Also, if the sample contains any values that are very repetitious, Oracle creates the specified number of buckets, but the value indicated by this column may be smaller because of an internal compression algorithm.
LAST_ANALYZED
DATE
The date on which this column was most recently analyzed
SAMPLE_SIZE
The sample size used in analyzing this column
CHARACTER_SET_NAME
VARCHAR2(44)
The name of the character set: CHAR_CS or NCHAR_CS
CHAR_COL_DECL_LENGTH
NUMBER
The length
GLOBAL_STATS
VARCHAR2(3)
For partitioned tables, indicates whether column statistics were collected for the table as a whole (YES) or were estimated from statistics on underlying partitions and subpartitions (NO).
USER_STATS
VARCHAR2(3)
Were the statistics entered directly by the user?
AVG_COL_LEN
NUMBER
Average length of the column (in bytes)
CHAR_LENGTH
NUMBER
Displays the length of the column in characters. This value only applies to the following datatypes:
CHAR
VARCHAR2
NCHAR
NVARCHAR
CHAR_USED
VARCHAR2(1)
B | C. B indicates that the column uses BYTE length semantics. C indicates that the column uses CHAR length semantics. NULL indicates the datatype is not any of the following:
CHAR
VARCHAR2
NCHAR
NVARCHAR2
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch2143.htm#1302694
Joel P�rez

Similar Messages

  • How to retrieve multiple columns using "returning" in the Insert query.

    hi,
    wanted to know how to retrieve multiple columns using "returning" in the Insert Query.
    For retrieving one column we write the query as follows:
    Insert into TABLE values(1,2,3,4) returning COLUMN1 into PARAMETER
    But can we retrive multiple columns in the same query?
    am using oracle 10g and coding in .NET

    Hi,
    You can definetely get multiple values from a single query using the 'returning' clause.
    Eg : insert into emp (empno, ename, job, deptno) values (7324,'ADAM','MARKETING',30) returning ename, deptno into var1, var2; PN : var1 & var2 to be declared as varchar2 & number respectively.
    More insight into the 'RETURNING' clause in this link.
    http://www.samoratech.com/PLSQL/swArtPLSQLReturn.htm
    Regards,
    Bhanu.

  • How to retrieve the data type of a column of a table?

    Hi,
    I want to retrieve the data type of a column of a table. At the moment I am querying "OCI_ATTR_DATA_TYPE" attribute but it is returning SQLT_CHR for both varchar2 and nvarchar2 data type columns. I need to distinguish between these two data types columns separately. Is there any API through which I could get the exact data type of a column i.e. "nvarchar2"?
    Thanks in advance.
    Hashim

    Hi,
    This is the Oracle C++ Call Interface (OCCI) forum - I'm not sure if you are using OCCI or OCI (Oracle Call Interface - the C interface) since you reference "OCI_ATTR_DATA_TYPE" which is more of an OCI focus than OCCI.
    In any case, you might take a look at "OCI_ATTR_CHARSET_FORM" which takes the following values:
    #define SQLCS_IMPLICIT 1     /* for CHAR, VARCHAR2, CLOB w/o a specified set */
    #define SQLCS_NCHAR    2                  /* for NCHAR, NCHAR VARYING, NCLOB */So, if you have a datatype of SQLT_CHR and OCI_ATTR_CHARSET_FORM is SQLCS_IMPLICIT then you have a varchar2 if it is SQLCS_NCHAR then you have an nvarchar2.
    If you are using OCCI and not OCI then take a look at MetaData::ATTR_DATA_TYPE and MetaData::ATTR_CHARSET_FORM which expose OCI_ATTR_DATA_TYPE and OCI_ATTR_CHARSET_FORM respectively.
    Perhaps that will get you what you want.
    Regards,
    Mark

  • How to retrieve the content type used in a document library (C# - Client Model).

    Hello,
    I need to know if it's possible to retrieve the content type used in a document library, so I can know the columns active and used in this document library. I am using the Client Model in C#.
    Thanks

    First, retrieve your document library as a List object. Then, use the
    List.ContentTypes property to iterate through all the content types assigned to the list.
    Blog:
    blog.beckybertram.com |
    RSS | @beckybertram |
    SharePoint 2010: Six-in-One

  • How to show attributes column types on ERD

    Hi,
    I created a diagram in ERD but can't find how to show in the diagram the column types. It only shows the column names but doesn't show if this is a varchar2, integer,etc or if this can be null or not. Please help.
    Thanks in advance.

    the idea is that entities are logical objects. Although you can designate a "format" for an attribute, it's really more of a physical model/implentation concept.
    So the answer to your question is No.
    However, If you wanted to use a Server model Diagram there is a lot more information associated with it.
    And since it is a actual model of the DB then you will have your foreign keys in the child tables.
    Michael

  • How to keep view column in a table

    Hi,
    I have two table and one view(I have same data in any other schema so I don't want to keep same data in both schema) I want to make primary key in first table based on one column from 2nd table and one column from view, but it's not looking possible if it's possible so how, if it is not there is any other solution.
    Thanks and Regards, Khawar.

    Hello all,
    Thanks for reply following are view and table desc.
    SQL> desc emp_dept_vw
    Name Null? Type
    EMP_ID NOT NULL VARCHAR2(10)
    F_NAME NOT NULL VARCHAR2(50)
    M_NAME VARCHAR2(15)
    L_NAME VARCHAR2(15)
    DESIGNATION VARCHAR2(40)
    JOIN_DATE DATE
    REGION_ID VARCHAR2(15)
    DEPT_ID VARCHAR2(30)
    FAMILY_NAME VARCHAR2(20)
    SEX CHAR(1)
    LOCATION VARCHAR2(20)
    DEPT_NAME VARCHAR2(30)
    SECTION VARCHAR2(40)
    SQL> desc pc_user
    Name Null? Type
    PC_SERIAL NOT NULL VARCHAR2(20)
    PRINTER_SERIAL VARCHAR2(20)
    SQL> desc pc
    Name Null? Type
    PC_SERIAL NOT NULL VARCHAR2(20)
    BRAND NOT NULL VARCHAR2(50)
    HDD_MODEL_NO CHAR(18)
    MEM_CODE VARCHAR2(20)
    NIC_CODE VARCHAR2(20)
    PROCESSOR_ID VARCHAR2(20)
    MONITOR_ID VARCHAR2(20)
    MOTHER_BOARD VARCHAR2(30)
    SUPP_ID VARCHAR2(20)
    FDD VARCHAR2(20)
    PRICE NOT NULL NUMBER
    WARRANTY NOT NULL VARCHAR2(20)
    DELIVERY_DATE NOT NULL DATE
    REMARKS NOT NULL VARCHAR2(200)
    I want to use EMP_ID from EMP_DEPT_VW view as a part of composite key in PC_USER table.
    Many Thanks .
    Khawar

  • How  to retrieve a column field value from an ADF table ?

    All,
    I have a backing bean where I have bounded a field of an ADF table.
    I would like, in the bean, to read the value of that field so that I can use it inside a task flow router.
    The question: how to read a value from a ADF table column field ?
    In the bean I have the getter and setter of the RichInputText ADF table field. But when I type:
    System.out.println("the name is: " + this.getName().getValue());
    or
    System.out.println("the name is: " + this.Name().getValue());
    I get a null pointer exception.
    Thanks in advance,
    Sergio.

    Thanks Marvin, but this is not really what I'm looking for. Or at least, it does not sounds like to be :)
    I need to get the value contained in a row cell of an ADF table.
    Let's say the table (two rows, three cells) contains these values:
    "table_A", "123", "John"
    "table_B", "456", "Peter"
    When I click on the first row, I need the value: "table_A". Once I got that value, I extract the last char, in this case: "A", and then I call a specific task flow from a task flow router (specified in the task flow router Cases property).
    When I click on the second row, the same process applies, only the router now points to another flow view.
    So to summarize, I need to get the value of a row cell in an ADF table. How to do that from within a javaBean in JDeveloper 11g Release 2 ?
    This is what I have in the bean; so far I've bounded the related row cell (herkunft) to the bean. Each time I select a row on the ADF table, the function setHerkunft() runs - I see that from within the JDeveloper console - but when I try to get its value, I get a null value - hence the surrounding if statement.
    package bean;
    import javax.faces.component.UIComponent;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.view.rich.component.rich.input.RichInputText;
    +public class taskFlowBean {+
    public RichInputText herkunft;
    public static String taskFlowView = "C";
    +public taskFlowBean() {+
    System.out.println("taskFlowBean constructor call");
    +}+
    +public void setHerkunft(RichInputText herkunft) {+
    System.out.println("set herkunft");
    this.herkunft = herkunft;
    if (this.getHerkunft().getValue() != null )
    System.out.println("herkunft is: " + this.getHerkunft().getValue());
    +//here taskFlowView will set accordingly with the herkunft value.+
    +}+
    +public RichInputText getHerkunft() {+
    System.out.println("get herkunft");
    return herkunft;
    +}+
    +public String getTaskFlowView() {+
    System.out.println("get taskFlowView ! : " this.taskFlowView);+
    return this.taskFlowView;
    +}+
    +}+
    Regards,
    Sergio.

  • How to retrieve 'long' column with 32K length in Java stored procedure

    For some reasons, we are not using CLOB, BLOB, or BFILE to store large objects and I have to live with LONG. So I wrote a Java stored procedure to insert, select and manipulate a LONG column by retrieving the LONG into a java.lang.String class (which happens to be the Java class mapped to the LONG SQL datatype). It all works fine as long as the length of the value being retrieved is less than the magic figure of 32767 bytes (which is the restriction on LONG and VARCHAR2 datatype in PL/SQL as well). So looks like Oracle's implementation of the JVM limits String values to a max of 32767 bytes. Suggestions on how to overcome this limitation (other classes that you suggest or do I have to move to files)?
    Thanks,
    Jeet
    null

    the jvm has nothing to do with it ...
    this is a pol/sql limitation on parameters in stored procedures.
    and java stored procedures require a clal spec that makes the j-s-p look like a pl/qsl stored proc.

  • How to retrieve Xml column in a table using Oracle Answers

    Hi,
    I am using a table with column consisting of Xml file.
    I have to retrieve all the data's from the XML file in Oracle Answers and display it in a table format.
    Help me to resolve this issue.
    Thanks in advance.

    You could write a view over the table that has the XML column and use Oracle XML DB functions to extract and represent the data in a table format. You can then map this view in Oracle BI Administration.
    I think stuff like XML transformations and extraction etc. is no task for Oracle BI and is best left to the Oracle Database.
    Thanks,
    Nilanshu.

  • How do i view this type of application?

    I copied this example code from a book, but i dont know how to view it as a running program:
    public class PondVolume {
         public static void main(String[] args) {
              if (args.length != 3) {
              System.out.println("Usage: java Pondvolume Length Width Depth");
              System.exit(0);
         float length = Float.valueOf(args[0]).floatValue();
         float width = Float.valueOf(args[1]).floatValue();
         float depth = Float.valueOf(args[2]).floatValue();
         float volume = length * width * depth * 7.5f;
         System.out.println("Pond length = " + length + " feet");
         System.out.println("Pond width = " + width + " feet");
         System.out.println("Pond depth = " + depth + " feet");
         System.out.println("Pond volume = " + volume + " gallons");
    is there anything wrong with this code, and how should i run it?
    Thanks

    At the command prompt you type "javac PondVolume.java" to compile and then to run type "java PondVolume x y z" where x is the length of your pond, y is the width, and z is the depth. The program will print the results to the screen.
    -S-

  • How to retrieve the action type of a PA40 action?

    Hi there,
    I am trying to find out the way to identify what was the action type for the personnel action that is just being executed. I will try to explain myself with a concrete example.
    Let's take the hiring action.
    A user goes to PA40 and initiates the action to hire a new employee. The program will then start guiding the user through the different infotypes defined within the infogroup.
    Let's say that the order is IT0001, IT0002, IT0006, ...
    I have setup table T779X to call a Function Module of my own after inserting IT0006. At that point in time I can know that the IT has been modified through transaction PA40 (sy-tcode) but, how can I know what action is being executed?
    Thanks

    Jim,
    Actions can always be found afterwards in IT000 indeed
    My problem is that I need to know what action type was initiated in REAL TIME. When I am debugging the batch for IT0006, after the user initiated an action through PA40
    Thanks for the answer anyway

  • How to retrieve internaltable column wise data in rowwise

    hi  all,
    My question is Suppose I  have intenal table with 3 cols and 4 rows of data.Now i want to display table first col data as first row and so on...
    input data :
    eg: c1    c2     c3
    r1 1     2       3
    r2 4     5       6
    r3 7     8       9
    r4 10    11      12.
    outputdata should be like this:
        1  4  7  10
        2  5  8  11
        3  6  9  12.
    please help me out ,
    Thanks in advance,
    Santhosh.E

    Santhosh,
    If you want to have some flexibility for extending to multiple columns --
      WA_DATA-COLUMN1 = '1'.
      WA_DATA-COLUMN2 = 'a'.
      WA_DATA-COLUMN3 = 'x'.
      APPEND WA_DATA TO T_DATA.
      WA_DATA-COLUMN1 = '2'.
      WA_DATA-COLUMN2 = 'b'.
      WA_DATA-COLUMN3 = 'y'.
      APPEND WA_DATA TO T_DATA.
      WA_DATA-COLUMN1 = '3'.
      WA_DATA-COLUMN2 = 'c'.
      WA_DATA-COLUMN3 = 'z'.
      APPEND WA_DATA TO T_DATA.
      LOOP AT T_DATA INTO WA_DATA.
        WRITE :/ WA_DATA-COLUMN1, WA_DATA-COLUMN2, WA_DATA-COLUMN3.
      ENDLOOP.
      NEW-LINE.
      FIELD-SYMBOLS : <FS_ANY> TYPE ANY.
      DATA : COL_NO TYPE I VALUE 1.
      DATA : ROW_NO TYPE I VALUE 1.
      DATA : TOTAL_LINES TYPE I.
      DATA : TOTAL_ROWS TYPE I.
      DESCRIBE TABLE T_DATA LINES TOTAL_ROWS.
      WHILE SY-INDEX <= TOTAL_ROWS.
        DO.
          READ TABLE T_DATA INTO WA_DATA INDEX ROW_NO.
          IF SY-SUBRC = 0.
            ASSIGN COMPONENT COL_NO OF STRUCTURE WA_DATA TO <FS_ANY>.
            WRITE: <FS_ANY>.
          ELSE.
            EXIT.
          ENDIF.
          ROW_NO = ROW_NO + 1.
        ENDDO.
        COL_NO = COL_NO + 1.
        ROW_NO = 1.
        NEW-LINE.
      ENDWHILE.
    Regards,
    Ravi
    Note : Please close the thread and mark the helpful answers
    Message was edited by: Ravikumar Allampallam

  • How to retrieve a column when left linked to multiple columns

    Hi,  I'm not having much luck tracking this down; not sure of the best keywords to use.  For some reason I seem to have never run into this before...
    I have an app which allows 5 tax codes to be entered (State, County, City...) for a Customer.  Naturally, all 5 fields use the same table for drawing data.  Logically like this:
    Table_Customer.Tax_Code 1 -> Table_Codes.Description
    Table_Customer.Tax_Code 2 -> Table_Codes.Description
    Table_Customer.Tax_Code 3 -> Table_Codes.Description
    Table_Customer.Tax_Code 4 -> Table_Codes.Description
    Table_Customer.Tax_Code 5 -> Table_Codes.Description
    Simply, how do I get Table_Codes.Description for Table_Customer.Tax_Code 2, 3, 4, 5?  If I just use Table_Codes.Description, I only get Table_Customer.Tax_Code 1...

    I not not too sure but I think
    that you need to join to 5 copies of the Table_Codes.Description
    when added in crystal it will warn you you already have them added and add alias for the last 4 Table_Codes_1 ,Table_Codes_2 ,Table_Codes_3, Table_Codes_4
    once doen you can use a little trick to alias the original as Table_Codes_5 then link them
    Table_Customer.Tax_Code 1 -> Table_Codes_1.Description
    Table_Customer.Tax_Code 2 -> Table_Codes_2.Description
    Table_Customer.Tax_Code 3 -> Table_Codes_3.Description
    Table_Customer.Tax_Code 4 -> Table_Codes_4.Description
    Table_Customer.Tax_Code 5 -> Table_Codes_5.Description

  • How to retrieve absence type(removal of HR_API_TRANSACTION_VALUES in R12)?

    Hi,
    Read the note 733287.1 and notice that the table HR_API_TRANSACTON_VALUES has been removed in R12. And the transaction data is keep in column TRANSACTION_DOCUMENT of HR_API_TRANSACTIONS table.
    We have several package that retrieve the PER_ABSENCE_ATTENDACE_TYPE from HR_API_TRANSACTION_VALUES tables. However, we are not able to query the info in R12 now. This is applicable for leave application via the Self Service Module.
    Would like to seek advise whether how to retrieve the absence attendance type in the Self Service Module in R12?
    Thanks in advance.
    Regards,
    SC

    Hi,
    Yes, the tansaction data is stored in transaction_doucment column of table hr_api_transactions in R12 as XML data
    You can get the ABSENCE_ATTENDACE_TYPE details from the follwoing tables:
    1> HR.per_absence_attendance_types
    2>per_abs_attendance_types_tl
    Thanks,
    Kumar

  • Oracle Views with Column type as CLOB

    I have a table which has a column of type CLOB. I am trying to creating a view which has all the columns of that table.
    I get
    Warning: View created with compilation errors.
    SQL> show errors;
    No errors
    Can any one help me how to create a view on a table wihich has a CLOB/BLOB column types. Also how to select the clob data from the view
    sree

    Are you the owner of the view you created?
    Check out the documentation for the SHOW command.
    If you omit schema, SHOW ERRORS assumes the object is located in your current schema.

Maybe you are looking for

  • First generation Ipod shuffle

    I got this shuffle from a friend. I am running OSX 10.4.11 on a 1.25 Gig PowerPC G4. When I plug in the shuffle neither the computer or iTunes will recognize the IPod and I get a continuous flashing green light. I have searched the posts but can't fi

  • Screen locked, lost connection

    i never tried the curtain mode before, but since i had to do some work on one of my client machines (imac running leopard) at a busy time of the day, i thought that locking the screen would be best. so, i drew the curtains on it, logged onto it's adm

  • How can I copy/paste without copying the formatting?

    How can I copy/paste without copying the formatting? For example, if I copy a sentence from a website and paste it on text editing program, it copies all the formatting as well. How can I turn that off?

  • Exception in thread "main" java.lang.InternalError: Can't connect to X11 wi

    Hello Friends, I dont know whether this would be the correct forum or not but my problem is very critical so please help me. 1. I am working on linux server where I have installed Tomcat4.x, Apache 2.0, JDK1.4.2. I have set all CLASSPATH. Java is wor

  • NW 2004s+MI

    hi all, Has anyone tried Mobile Infrastructure on NetWeaver 2004s? if so, can you let me know how to setup the middleware for MI? Is there any post-installation configuration like what we do in WebAS640? Regards Ak. PS: Useful answers will be appropr