How to get the name constraintlist and column in a table?

Hello


can someone please tell me how to get the type of constraint, and it is imposed on the names of columns in a table.




Thank you
Nico

Hello

Use the two tables:

select * from all_constraints

select * from ALL_CONS_COLUMNS

Sorry SY, you were faster than me...

Published by: user11268895 on August 19, 2010 13:27

Tags: Database

Similar Questions

  • How to get the name element and xml comment in a page?

    I need to list all the name element and comment on a page

    You can use below methods.

    IXMLUtils::GetElementIndices()

    IFrameList::QueryFrameContaining()

  • How to find the name of a column in a table

    Hi all

    I have a Table that contains approximately 100 columns.


    I need to find the column name, to find in specific columns containing data like 'abc '.

    Ex: I have a table like temp_table_name
    the columns are col1, col2, col3, col4, col5, col6, col7, col8,.... col99
    I'm looking for with data specific like 'abc '.

    Need to find the name of the table column that contains data of 'abc '.

    Please suggest me. How to find in a single query... :-)

    Actually I'm looking through a column of the table as below
    Select count (*) in the temp_table_name where col1 = 'abc '.

    FOR I IN 1.20 LOOP
    ln_num_of_rows: = 0;
    lv_column_name_search: = "col" | I have;

    lv_sql: = ' select count (*) in the temp_table_name where ' | lv_column_name_search | "= abc";

    EXECUTE IMMEDIATE lv_sql INTO ln_num_of_rows;

    IF ln_num_of_rows > 0
    -column found in lv_column_name_search
    EXIT;
    END IF;
    END LOOP;

    But I'm gettig performance problem.

    How can I do this in any other alternative way? could you suggest any way possible as soon as POSSIBLE.

    It's probably never going to be effective - realistic, you have to scan completes the picture.

    You could probably improve a little things by doing something like

    SELECT DISTINCT column_name
      FROM (
        SELECT (CASE WHEN col1 = 'abc' THEN 'col1'
                    WHEN col2 = 'abc' THEN 'col2'
                    WHEN col3 = 'abc' THEN 'col3'
                    ...
                    WHEN col20 = 'abc' THEN 'col20'
                    ELSE NULL
                    END) column_name
          FROM table_name
        WHERE col1 = 'abc'
            OR col2 = 'abc'
            ...
            OR col20 = 'abc'
      )
    

    but it's never going to be incredibly fast.

    Justin

  • How to get the names of the table columns in the quick dashboard

    How to get the names of the table columns in the quick dashboard


    Thanks and greetings
    ------------------------
    Kishore P

    Make a prompt like:

    SELECT case when 1 = 0 then 'D0 time. " "" T02 by month name "other" 'D2 market' '. "" M04 region' ' the end 'Sample Sales' UNION ALL SELECT case when 1 = 0 then 'D0 Time. " "" T02 by month name ' else ' 'Time D0. "" T02 by month name ' ' the end 'Sample Sales.

    Put the name of column in single quotes.

    Make your rank as a function:
    Rank ('F1 income'. "" Recipes 1-01 (after all) "by @{pColumn} {'D0 time'. ({"" T05 annually name '})

    It works fine for me

    concerning

    John

    http://obiee101.blogspot.com

  • How to get the name of sbRIO programmatically

    How to get the 'name' and 'Comment' by sbRIO I write to sbRIO-9602 Max in the box of Identification (model, serial number, MAC address, name)?

    Use RT Information.vi of target is located under the range of public services under LabVIEW Realtime.

    Christian

  • How to get the name of the particular index table option.

    Hello

    Can any body tell how to get the name of the item to a particular array.i have a table within array.i must compare the name of Francesca in particular key.here is the table.

    myArray= Array (@43b1e09)
    [0] = object (@42b33f9)
    Testing_1 = Array (@4428821)
    [0] = object (@43adc19)
    choice_id = '0 '.
    delete = "N".
    DownloadURL = "xyz".
    selected = 'Y '.
    translation = "2_486."
    length = 1
    length = "N".
    Editable = 'Y '.
    field_id = '388 '.
    LanguageLink = 'Y '.
    linked_definition_id = null
    multiple values = "N".
    name = "Photo".
    otheroption = "N".
    photovitlink = object (@43ad0d9)
    required = "N".
    step = '1 '.
    translation = "Photo".
    visible = 'Y '.
    [1] = object (@43ad5d9)
    [2] = object (@4490089)

    Here is the structure of the table I get server side.i give table name of result as table myArray.This have several child as an object of object.each having .i table (Testing_1 in the first case) must get the name of this Testing_1 table and compare with my sort key that I perform an operation. But I am unable to get the name of this Testing_1 array(Since_it_is_dynamic_so_this_name_changes_some_times).can a body guide me how to get the name of this table.



    Thanks and greetings

    Vineet Sharma

    Hi Vineet Osho,

    You can browse your object using the loop and you can get the name of the table... as below...

    for each (var obj:Object in myArray)
    {
    for (var str:String in obj)
    {
    If (obj [str] is array)
    {
    var arrayName:String = str;
    }
    }
    }

    Thank you

    Jean Claude

  • How to get the names of the tabs in the void?

    Hi all

    Could someone tell me how to get the names of all the tabs of void?

    I have Parent tab T1. T1 has 3 tabs sup T1_1, T1_2 and T1_3.

    I would like to have T1_1, T1_2 and T1_3 names tab in the list.

    Thanks in advance!

    Dip

    Dip,

    You can get the name of the tab of the apex, apex_application_tabs & apex_application_parent_tabs dictionary views. Thank you.

    Kind regards
    Manish

  • How to get the name of the server instance

    Hi all!!

    First of all, sorry if this is not the place to leave this question, but I didn't know where to post.

    I have a weblogic 9.2 MP3 installed in a x 64 Redhat Linux. It is clustered in 2 cases.
    An application is deployed in both cases, each request between two instances of balancing.

    Of course, a request is responsed by only one instance, and I would like to know how to get the name of the instance that processes a request of some.

    I read that I can send using recorded weblogic mbeans in this way:
    InitialContext ctx = new InitialContext();
    MBeanServer mbean = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");
    Then
    ObjectName rs = new ObjectName("com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean");
    Set beans = mbean.queryNames(rs, null);
    And finally I iterate over the beans, but I'm not able to retrieve the name of the instance. I suppose that the object name is not appropriate.

    However, I am able to get the name of the server and the two names of instances per a JMX connection to service:jmx:t3://localhost:7001/jndi/weblogic.management.mbeanservers.domainruntime, but this isn't what I want because I need to know what is the instance that is a certain demand.

    Anyone know how I can do?

    Thank you very much and sorry for the English xD

    Published by: mamntc02 on 01/05/2010 05:10

    That should do it...

    private String getServerName() throws Exception {}
    try {}
    Context ctx = new world;
    MBeanServer mbeanServer = (MBeanServer)ctx.lookup("java:comp/env/jmx/runtime");

    String runtimeServiceName = "com.bea:Name = RuntimeService, Type = weblogic.management.mbeanservers.runtime.RuntimeServiceMBean;

    Create ObjectName for the runtime
    RuntimeService ObjectName = new ObjectName (runtimeServiceName);

    Get the object for the ObjectName ServerRuntimeMBean name
    ObjectName serverRuntime = mbeanServer.getAttribute (runtimeService, "ServerRuntime") (ObjectName);

    Get the name of the server
    String serverName = (String) mbeanServer.getAttribute (serverRuntime, "Name");
    If (serverName == null) return "";
    otherwise return serverName;
    }
    catch (Exception e) {}
    throw e;
    }
    }

  • How to get the battery level and status in the cpp file?

    Hi all

    BatteryInfo class so I can I know how to get the battery level and the State in .cpp class?

    Hi Benecore,

    I have Add method below,

    #include

    But I only variable BatteryInfoPrivate not get variable BatteryInfo. You can also check on your side.

    So let me know how to get batteryInfo instance?

  • How to get the friend list and their IDS in the integration of Facebook using Facebook SDK

    can any body send me the code
    How to get the friend list and their IDS in the integration of Facebook using Facebook SDK
    I did after connection and wall

    Welcome on the support forums.

    Please check the strawberry sample that ships with the SDK

  • How to get the value of a column in sql query?

    Hi, anyone knows how to get the value of a column in sql query?

    Here is my code, the value must be 1350079224397 in my PB, but I get 0

    QString query ("SELECT version FROM db_version");

    QVariant result = sda.execute (query);
    QVariantMap versionMap = result.toList () such () .toMap ();
    If (! versionMap.IsEmpty ())
    {
    qDebug()<"Version: "=""><>
    }

    OK, I have the solution

    QString query ("SELECT version as version FROM db_version");

  • How to get the name of the alias of an attribute in a column named VO?

    How can I get the name of the alias of an attribute in a given VO its column name programmatically?
    Often the alias names and column are not same if the VO is created (and I do not require that they are the same)

    [URL http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17483/toc.htm] ADF Model JavaDocs, something like this should work:

    vo.getAttributeDefs () - returns an array of AttributeDef which you can then browse, check getColumnName() for each of them (this is called the "alias") and when you find the right method, call getName() for the name of the attribute

    John

  • How to get the name of the bluetooth device and the name of the bluetooth device address device class?

    Hi all

    Can I know how to get the bluetooth device name and the name of the bluetooth device address device class?

    Example:-if my bluetooth device address is :-98:EB:CD:01:1F::90 then how do I get my bluetooth device name?

    I hope you understand my problem. Let me know as soon as possible.

    :

    Thanks for the reply.

  • How to get the name and number of the procedure parameter list or a function?

    I stated the procedure described in the package

    If I want to get the number and the name of the parameter list, so how do I it

    I don't have I her name with the package.

    create or replace package demoApp is

    PROCEDURE insert_data (p_fname IN VARCHAR2,

    p_lname IN VARCHAR2,

    p_address IN VARCHAR2,

    p_cellno IN VARCHAR2,

    p_email IN varchar2);

    end demoApp;

    create or replace package demoApp body is

    PROCEDURE insert_data (p_fname IN VARCHAR2,

    p_lname IN VARCHAR2,

    p_address IN VARCHAR2,

    p_cellno IN VARCHAR2,

    p_email IN varchar2) IS

    EmpID number;

    BEGIN

    Select nvl (max (emp1.empid), 0) + 1 in EMP1 empid;

    INSERT INTO VALUES EMP1 (empid, p_fname, p_lname, p_address, p_cellno, p_email);

    EXCEPTION

    WHILE OTHERS THEN

    raise_application_error (-20001,' insert the problem ' |) SQLERRM);

    END;

    end demoApp;

    -----------------

    I want to get the name of the parameter and the number of use of stroredrprocedure ""demoApp.insert_data " "

    Select *.

    of all_arguments

    where package_name = 'DEMOAPP.

    and object_name = 'INSERT_DATA.

  • How to get the name of the client computer and the name of the customer osuser

    Hello everyone,
    the trigger below works fine. But I want to get the name of the client computer and the name of osuser customer in the output of the same trigger shown below, how do I do this in the same trigger? any help is highly appreciated.
    Thank you and best regards.

    triggering factor:
    ------------
    CREATE TABLE logonaudit
    (
    user_id VARCHAR2 (30),
    sess_id NUMBER (10),
    LOGON_TIME DATE,
    host VARCHAR2 (20));

    Table created.

    CREATE OR REPLACE
    Logon_audit RELAXATION
    AFTER LOGON
    WE DATABASE
    DECLARE
    V_program varchar2 (120);
    BEGIN
    SELECT UPPER (program)
    IN v_program
    SESSION $ v
    WHERE audsid = sys_context ('USERENV', 'SESSIONID');
    If (upper (v_program) as 'TOAD %' or upper (v_program) like '% SQLPLUS %')
    then
    INSERT
    IN logonaudit
    VALUES)
    user,
    sys_context ('userenv', 'sessionid'),
    SYSDATE,
    sys_context ('userenv', 'host')
    );
    end if;
    END;

    the output showing sessionid, date, db user name, as a local server machine name.but I want osuser of customer names and the name of the client computer as you know connection of clients to the database of their machines.how can I achieve? any help much appreciated.

    Published by: 938946 on December 25, 2012 12:15 AM

    According to AskTom - do not use audsid, dangerous - can be 'zero '.

Maybe you are looking for

  • Internet Explore 7

    I can't play any games msn, pogo.it loads, but when I click on play nothing happens.i had to download another browser just to beable to play games and that s.

  • want that computer back when I bought it, but need help on Toshiba satellite Home Premium runnin vista

    I covered by default sotware (Toshiba Recovery Wizard) on my computer I wanted to get back to when I bought my computer, but under this option, it is also recover without changing the hard drive partitions and then also recover from a patition custom

  • SATA 3 Upgrade hard drive

    Problems with my hard drive so I'm upgrading to a larger device SATA 3. Just thought I would check with Dell to see if the motherboard supports SATA 3 or if it would simply be it throttle back so that it acts as a SATA 2 device. Unfortunately, I had

  • Cisco VOIP cue MWI light turns is not on

    Hello We have a MAN running - CUE system, people can leave and listen to voicemail with no problems, but on phones voicemail indicator does not. It is always disabled. CME - Config and debug CCSIP CUE are attached. Can you please check and advise. is

  • BlackBerry Smartphones Linkedin app gives error loading module

    Links in app gives error loading module in 9300 curve and after you have uninstalled it my curve 9300 has started to freeze at the navigation with a white screen... someone can tell me how to freeze screen resorve white!