JOIN DELETE - SQL

Is it possible to use a JOIN to delete multiple rows from
multiple tables
using a common key?
Lets say I have 3 tabels (Info, Guests, Host) and they all
share a common
column (show_id). I want to remove all the records from each
table that have
the same 'show_id'.
DELETE FROM Info, Guests, Hosts
WHERE show_id = #URL.show_id#
Will this work? I don't have a live database to work with at
the moment and
I want to start the CFCs for it and came across this
situation.
Thanks

I am a wee bit confused on the <cftransaction> tag. I
am doing this out of a
CFC and have all 3 deletes set up in a function. Is that any
different than
setting up the 3 deletes in a <cftransaction> tag?
"Ian Skinner" <[email protected]> wrote in
message
news:edsh8n$d0i$[email protected]..
>I doubt that will work, but I am not sure.
>
> If it does not you can use the <cftransaction> tag
to group all the
> deletes together so that they all happen or none of them
happen.
>
> <cftransaction>
> DELETE FROM Info
> WHERE show_id = #URL.show_id#
>
> DELETE FROM Guests
> WHERE show_id = #URL.show_id#
>
> DELETE FROM Hosts
> WHERE show_id = #URL.show_id#
> </cftransaction>

Similar Messages

  • Migrating got JOIN DELETED howto in Oracle 9i???

    Hi,
    I'm doing a migration from SQL Server 2000, my statement actually work, but I want to optimize... I just can't find an equivalent for JOIN Deleted or JOIN Inserted ...
    anyone can give me a hint?
    Thanks
    Pete

    generally, that error appears if the field data on form is different from what in database, you are in single user system situation, e.g., format mask may cause it, search the error number in metalink form forum, you will see tons of the docs, which will help you debug it out.
    Another point is that you may need to add on-lock and on-update/insert/delete trigger as your form is acutally based on a view unless your UML table is PK table.

  • SAP Restart to Delete SQL Packages

    I am starting this discussion on behalf of a client:
    Especially the "veterans" of AS/400 remember, that in the beginning of SAP on AS/400 it was often necessary to stop the SAP instance and delete the SQL packages in order to overcome database errors that usually showed up as SQL -901 errors. This way of "fixing" SQL -901 became like a habit, so that support employees often recommended to stop the SAP instance and delete SQL packages when a simple restart of the failing work process would have fixed the problem. Later we recommended to use profile parameter rdisp/wp_auto_restart to restart work processes automatically once a day (for example), and that seemed to have solved the problem. However, my client is not quite convinced that this works and does not want to "play" with the production system. They are using an ECC 6.0 system with a 10 TB database and about 4000 active users.
    Question to this group: Do you have systems with a similary size that run several weeks (or even months) without interruption for deleting SQL packages? If so, do you use profile parameter rdisp/wp_auto_restart, and what value is configured? Also "negative" answers are welcome, i.e. if you have the experience that the SQL packages must be deleted on a regular base for the sytem to work properly, please let us know, too.
    Thanks a lot for your cooperation.
    Kind regards,
    Christian Bartels.

    Hi Christian and Jim,
    Our production database is 8 TB with 3400 named users (1,000 or so concurrent).  We still are "old school" and delete the SQL packs during normal maintenance twice a month (either two or three week interval). I know we have gone longer if we were having a lot of go-lives but I don't think it has happened since we upgraded to ECC 6.0.
    We did have some SQL pack issues a while ago but it turned out to be they were reaching the maximum size for table IBSYMBOL. Since then we set the QAQQINI value "SQL_INCREASE_PKG_LIMIT = *YES " which doubled the allowable size to 1GB I believe. We still were reaching the max and we ended up inserting a profile parameter.
    "dbs/db4/dbsl_tablehint0         =           Table = 'IBSYMBOL' & nMarkers > 100 ? SingleExecutionReuse"
    Credits - Steve Tlusty of IBM came up with the fix
    During that round of fun, Steve also had us adjust the following parameters -
    rdisp/noptime                        =             605800
    rdisp/wp_auto_restart          =             604800
    Note - even though we are at 6.1.1 now, the adjustments were made on 4.7x200 while running under V5R4 so I don't know if they are still required.
    Have I rambled too long?
    Craig

  • Joining v$sql and V$SQL_SHARED_CURSOR in  9.2

    Hi,
    I'm trying to resolve why bind aware statements are not shared , but not sure how to join v$sql V$SQL_SHARED_CURSOR to
    get valuable information .
    Please advice.
    Regards.
    Greg

    GregG wrote:
    Hi,
    I'm trying to resolve why bind aware statements are not shared , but not sure how to join v$sql V$SQL_SHARED_CURSOR to
    get valuable information .
    Please advice.On the combination of SQL_ID and ADDRESS columns?

  • When to delete SQL Packages

    It's been a long time and I've forgotten: If a new cumulative fix pack is installed at the OS-level, do you need to delete SQL packages?
    Thanks in advance,
    Robert

    Hi Bob,
    YES !!!!!!
    (as soon as you install 1 PTF only, you should delete all SQL packs!)
    Regards
    Volker Gueldenpfennig, consolut international ag
    http://www.consolut.de - http://www.4soi.de - http://www.easymarketplace.de

  • Backing up .mdf's and .ldf's using hard drive backup utility deleting SQL Server backup devices...

    I am a software developer using Windows 8.1, Visual Studio 2013, and SQL Server 2014. I have a number (30+) of SQL Server databases that I use in my development and support activities.
    Every time I run a backup (full or incremental) all of the backup devices in my instance of SQL Server 2014 are being deleted. I can add them all back in (a time-consuming and irritating process after about the 5th time), and the very next time I run either
    the Acronis Backup and Paragon Hard Drive Backup against the volume (D:) that contains all of the .mdf and .ldf files, all of the backup devices are again deleted.
    I hope someone can give me some idea of how to get around this problem or how to eliminate it completely.  Should I not be using these types of backup utilities to copy the .mdf's and .ldf's?  I've just never seen backup devices be deleted from SQL
    Server.  I have dumped the contents of the backup devices data within SQL Server and the rows are definitely gone after the either of the backups run.
    Thanks in advance for any light you can shed on this problem. It is very time-consuming and seems pretty silly to me -- but it's happening nonetheless.

    The last backup location you use is never stored in sys.backup_devices.  That's an instance-wide table for registering shared backup locations, mosly for tape backups in the old days.
    Per-database backup history is stored in msdb, and AFAIK the database backup dialog in SSMS is pre-populated with a location from msdb.  It looks like it runs this query
    exec sp_executesql N'SELECT
    bkpmf.media_family_id AS [ID],
    bkpmf.family_sequence_number AS [FamilySequenceNumber],
    bkpmf.media_count AS [MediaCount],
    bkpmf.logical_device_name AS [LogicalDeviceName],
    bkpmf.physical_device_name AS [PhysicalDeviceName],
    CASE WHEN bkpmf.device_type > 100 THEN bkpmf.device_type - 100 ELSE bkpmf.device_type END AS [BackupDeviceType],
    CAST(CASE WHEN bkpmf.device_type > 100 THEN 1 ELSE 0 END AS bit) AS [IsBackupDevicePermanent],
    bkpmf.physical_block_size AS [PhysicalBlockSize]
    FROM
    msdb.dbo.backupmediaset bkpms
    INNER JOIN msdb.dbo.backupmediafamily bkpmf ON bkpmf.media_set_id=bkpms.media_set_id
    WHERE
    (bkpms.media_set_id=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'3'
    So it's possible that your backup software is purging that table, eg by runningmsdb.dbo.sp_delete_database_backuphistory. 
    Or perhaps more likely, your backup software is adding data to the SQL Server backup history that prevents SSMS from pre-populating the backup dialog with your last TSQL backup location.
    In any case, you don't need to manually take the bakcups through SSMS every day.  You can just save a script of your backup commands (by hitting the Script button on the backup dialog) and run that.  Or create a SQL agent job to run the script
    or use a database maintence plan.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Convert Joins from SQL Server to Oracle

    I am converting a client application's back end from using SQL Server to Oracle. This application provides a GUI that allows people to capture one or more areas of text in a text file and create database tables from these areas. It allows them to perform joins between the tables, etc. I have to convert the area that programatically creates queries behind the scenes to do these joins. Having not done much work with Oracle joins, I'm wondering if someone could show me how I could convert the sample join provided. I can probably handle the rest from there.
    SQL Server Query:
    SELECT
    [T1].[Tk] AS [Tk],
    [T1].[Tk Title] AS [Tk Title],
    [T2].[Rate] AS [Rate],
    [T1].[TotCurHrs] AS [TotCurHrs],
    [T1].[TotCurAmt] AS [TotCurAmt],
    [T1].[TotCaseHrs] AS [TotCaseHrs],
    [T1].[TotCaseAmt] AS [TotCaseAmt],
    [T3].[SortF] AS [SortF]
    FROM
    [T1] FULL JOIN [T2] ON [T1].[Tk] = [T2].[TKName]
    INNER JOIN [T3] ON [T1].[Tk Title] = [T3].[EliteTitle]
    )

    Do as previous colleagues suggested, although you may get the problem with column names. I see at leats one of them has space in it [Tk Title]. So the question is - how you migrated table structure to Oracle? Do the column names are ABSOLUTELY the same as in MS? Then you have to replace brackets with double quotes ", because normally Oracle all identifiers tries to convert to uppercase and also space is not allowed. Only if you use quotes this is possible.
    Gints Plivna
    http://www.gplivna.eu
    Edited by: gintsp on Oct 13, 2010 4:04 PM

  • Cross database join Oracle - SQL server date column - nQSError: 46008

    Hi,
    I am using OBIEE 10.1.3.4.2 and
    I am able to make cross database join between Oracle and SQL server using varchar columns, but I am getting this error:
    nQSError:22024-A comparison is being carried out between noncompatible type when I try to make "foreign key" join between two tables (one from Oracle, second from SQL Server) using number columns (INT, DOUBLE...). It is strange, but I when I make "complex join" on physical layer no error is thrown and everything works fine.
    But I am not able to make join between tables using Date column. Column in Oracle table has DATE datatype, column in SQL server tables has datetimeoffset(7) datatype (example: 2011-07-19 13:14:22.2032605 +02:00). So I tried to cast datetimeoffset(7) to date datatype using "convert(DATE,HappenedOn,120)" - this returns me 2011-07-19 . In this format, BI can show converted date column, I can make filter using this date column, but I am not able to make physical join with Oracle table using this column
    Answer using data from both joined tables gives me this error:
    [nQSError: 46008] Internal error: File .\DataType\SUKeyCompare.cpp, line 875. (HY000)
    Do you have some tips, how to solve this "bug"?

    Parse the command column to get the SSIS package file name may be your only option here.

  • How to write self join in sql?

    Hi,
    I have table named "table_upload", column "record_type" value "01,03,04....." and start_date,end_date and so on
    And i will have value for  start_date,end_date only for record_type=01,rest of type these two columns will be null.
    now i need to write query with self join, to include above concept. can any one please help me .
    and my query look like follows,

    I just want to re write
    Please provide DDL+DML + expected output!
    and short explanation what is it that we all ask you for:
    DDL = Data Definition Language. In our case that is, CREATE TABLE statements for your tables and other definitions that are needed to understand your tables structure and there for let us to test and reproduce the problem in our server. Without DDL no one
    can execute any query.
    How to get DDL: Right click on the table in Object Explorer and select script table as CREATE. Post these create table scripts here.
    DML = data manipulation language is a family of queries used for manipulating the data it self like: inserting, deleting and updating data. In our case we need some sample data in order to check the query and get result, so we need some indert query for
    sample data.
    If you post a "create table query" for the tables and "insert <table> query" with some sample, then we could help you without Assuming/Guessing. There is a reason that DDL is generally asked for and expected when discussing query problems - it helps
    to identify issues, clarify terminology and prevent incorrect assumptions.  Sample data also provides a common point of reference for the discussion. A script that can be used to illustrate or reproduce the issue you have, will encourage others to help.
    [Personal Site] [Blog] [Facebook]

  • Join v$sql and v$session

    Hi All,
    I want following columns from both v$sql(last_active_time) and v$session(username,status ,program)
    Cud anyone guide me how to what is the sql that joins both views so that i get above column info ?
    Thanks a lot

    sybrand_b wrote:
    Yep but that is a 9i response and it won't work, IIRC, in 10g and higher.
    Sybrand,
    Why it won't work in 10g or higher?
    SQL> /
    Enter value for sid: 138
    old   6:    and ses.sid=&&sid
    new   6:    and ses.sid=138
    SQL_TEXT
    select /*+ ORDERED USE_NL(st) */ sql_text   from v$session ses,
           v$sqltext st   where st.address = ses.sql_address    and
    st.hash_value=ses.sql_hash_value    and ses.sid=138 order by pie
    ce
    SQL> l
      1  select /*+ ORDERED USE_NL(st) */ sql_text
      2    from v$session ses,
      3         v$sqltext st
      4    where st.address = ses.sql_address
      5     and st.hash_value=ses.sql_hash_value
      6     and ses.sid=&&sid
      7* order by piece
    SQL> select * from V$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    SQL>Regards
    Aman....

  • Accidentally deleted SQL Cert "ConfigMgr SQL Server Identification Certificate"

    Hi,
    a customer accidentally deleted  the SQL Cert which is created automatically during the SCCM setup and now SCCM is not working.
    Infrastructure:
    SCCM 2012, CU1
    SQL 2008 R2 SP1, CU7
    Both Components are on the same box.
    Is the certificate stored somewhere locally or what steps are necessary, that SCCM is working fine again.
    Thanks in advance!
    Regards,
    Tom

    I had the same problem (tried to copy the certificate from the server to my workstation to edit the reports, ended up moving it, loosing the private key in the process)
    I was able to restore the private key using this article http://www.entrust.net/knowledge-base/technote.cfm?tn=7905
    and the tool certutil –repairstore my <serial number> 
    just in case it happens to someone else.

  • Kodo 4.0.1 wrong delete sql

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
    <META content="MSHTML 6.00.2900.2963" name=GENERATOR>
    <STYLE></STYLE>
    </HEAD>
    <BODY>
    <DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
    <DIV><FONT face=Arial size=2>I have the following class:</FONT></DIV>
    <DIV>
    <P align=left><FONT face=Arial size=2>public class CurrencyRateList {</FONT></P>
    <P align=left><FONT face=Arial size=2></FONT></P>
    <P align=left><FONT face=Arial size=2></FONT></P>
    <P align=left><FONT face=Arial size=2>   private Map<Currency,
    Double> rateList =  new HashMap<Currency, Double>();</FONT></P>
    <P align=left><FONT face=Arial size=2>   public void
    removeConversionRate(Currency cur) {</FONT></P>
    <P align=left><FONT face=Arial
    size=2>                 
    rateList.remove(cur);</FONT></P>
    <P><FONT face=Arial size=2>  }</FONT></P>
    <P align=left><FONT face=Arial size=2></FONT></P>
    <P align=left><FONT face=Arial size=2></FONT></P>
    <P align=left><FONT face=Arial size=2>}</FONT></P>
    <P align=left><FONT face=Arial size=2>I've created and added a ValueHandler for
    Currency.</FONT></P>
    <P align=left><FONT face=Arial size=2>calling
    CurrencyRateList.removeConversionRate(Currency.getInstance("USD"))  results
    in the following sql:</FONT></P>
    <P><FONT face=Arial size=2>DELETE FROM dbo.CURRE_RATELIST WHERE CURRENCYCODEKEY
    = ? [params=(String) USD]</FONT></P>
    <P><FONT face=Arial size=2>which will result in all USD currencies being deleted
    from all CurrencyRateLists instead of one.</FONT></P>
    <P><FONT face=Arial size=2></FONT> </P>
    <P><FONT face=Arial size=2>kind regards,</FONT></P>
    <P><FONT face=Arial size=2>Christiaan</FONT></P></DIV></BODY></HTML>

    This is a bug. We've fixed it internally for the next release. In the
    meantime, you should be able to work around it by resetting the map
    contents, such as:
    pc.setMap(new HashMap(pc.getMap()));
    pc.getMap().remove(key);
    That will cause Kodo to completely delete and re-insert the map data in
    the DB, rather than removing the single key. Obviously less efficient,
    but it should at least work properly.
    Thanks for the report. If you need to follow up with support on this
    for patches, etc, reference CR #292916.

  • Joining Tables SQL SCCM Query

    Hello Im trying to find all users that have Microsoft Project installed I also need their full name not just their user login. I cant see whats wrong with my SQl query? Any help appreciated. I get "Invalid view" error.
    select distinct
    SMS_R_System.Name,
    SMS_R_System.LastLogonUserName,
    SMS_R_System.LastLogonTimestamp,
    SMS_R_System.DistinguishedName,
    SMS_R_System.operatingSystem,
    SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName,
    USR.Full_User_name0
    from
    SMS_R_System
    inner join
    SMS_G_System_ADD_REMOVE_PROGRAMS on
    SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId
    inner join
    v_r_user as USR on
    sys.User_Name0 = USR.User_Name0
    where
    SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName
    like
    "%Project%"
    order by
    SMS_R_System.Name
    SCCM Deployment Technician

    Ah yes now I understand, thankyou for the tip here is the correct code.
    select distinct
    SMS_R_System.Name,
    SMS_R_System.LastLogonUserName,
    SMS_R_System.LastLogonTimestamp,
    SMS_R_System.DistinguishedName,
    SMS_R_System.operatingSystem,
    SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName,
    SMS_R_User.FullUserName
    from
    SMS_R_System
    inner join
    SMS_G_System_ADD_REMOVE_PROGRAMS on
    SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId
    inner join
    SMS_R_User on
    SMS_R_User.UserName=SMS_R_System.LastLogonUserName
    where
    SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName
    like
    "%Project%"
    order by
    SMS_R_System.Name
    SCCM Deployment Technician

  • Cross Join in SQL

    From relational algebra, cross join or cross product or cartesion product is the set of all combinations of tuples in R and S where R and S are relations. Is there anyway I can do the same in SQL?
    Thanks,
    Mustafa

    in oracle 9i u can also say
    select <column list>
    from <table 1> cross join <table 2>
    where <condition>
    here where clause is optional....

  • Need assistance with conditional join in SQL

    Hi All -
    I need to ask for help with this query:
    Create table user_tab_col_test (table_name varchar2(30), column_name varchar2(30), data_type varchar2(30));
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column1', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column2', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column3', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table1', 'column4', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column1', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column2', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column3', 'varchar2')
    Insert into user_tab_col_test (table_name, column_name, data_type) values ('table2', 'column4', 'varchar2')
    Commit;
    Create table all_cons_columns_test (table_name varchar2(30), column_name varchar2(30), constraint_name varchar2(30))
    Insert into all_cons_columns_test (table_name, column_name, constraint_name) values ('table1', 'column1', 'primary')
    Insert into all_cons_columns_test (table_name, column_name, constraint_name) values ('table1', 'column1', 'secondary')
    Commit;
    This is my query and the current result:
    Select u.table_name, u.column_name, c.constraint_name
    From user_tab_col_test u
    Left outer join all_cons_columns_test c
    On ( u.table_name = c.table_name
    AND U.COLUMN_NAME = C.COLUMN_NAME
    AND C.CONSTRAINT_NAME IN ('primary'))
    order by U.table_name, U.COLUMN_NAME;
    TABLE_NAME COLUMN_NAME CONSTRAINT_NAME
    table1 column1 primary
    table1 column2
    table1 column3
    table2 column1
    table2 column2
    Three questions:
    1) I only want to return results where table_name = 'table1'. I can't seem to get this to work.
    2) Is my query proper and is this the best way to return my desired results? I.e. I want all columns from user_tab_col_test and I only want to display the constraint_name from all_cons_columns_test if the constraint_name = 'primary'.
    3) Will the synatx be the same if I need to join a third table to all_cons_columns_test?
    Any advice/suggestions are much appreciated -
    john
    Edited by: user703358 on Jan 11, 2013 8:57 PM
    Edited by: user703358 on Jan 11, 2013 9:48 PM

    Hi,
    user703358 wrote:
    ... ALL_CONSTRAINTS_TEST joins to ALL_CONS_COLUMNS_TEST on TABLE_NAME and CONSTRAINT_NAME. If you adapt this to use the data dictionary views ALL_CONSTRAINTS and ALL_CONS_COLUMNS, then rememeber to join on the OWNER column, also.
    Ultimately I want to use ALL_CONSTRAINTS_TEST.CONSTRAINT_TYPE = 'P' in my WHERE clause, instead of C.CONSTRAINT_NAME IN (primary), only because the constraint_type is a more definitive attribute than just the name of the constraint.
    I tried something like the query below but I'm getting
    ORA-00904: "U"."COLUMN_NAME": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:  
    *Action:
    Error at Line: 8 Column: 16Errors like that are caused by trying to mix old join syntax with ANSI join syntax in the same query.
    SELECT    u.table_name
    ,       u.column_name
    ,       C.CONSTRAINT_NAME
    FROM           USER_TAB_COL_TEST      U,
    ALL_CONSTRAINTS_TEST ACAbove is an example of an old-style join: there is a comma between the table names, and the join conditions are included in the WHERE clause below.
    LEFT OUTER JOIN  all_cons_columns_test  c
    ON    u.table_name    = c.table_name
    AND   U.COLUMN_NAME    = C.COLUMN_NAMEThis is an example of an ANSI-style join: the keyword JOIN appears between the table names, and the join conditions are right here, after the keyword ON.
    WHERE      U.TABLE_NAME    = 'table1'
    AND C.TABLE_NAME = AC.TABLE_NAME
    AND C.CONSTRAINT_NAME = AC.CONSTRAINT_NAME
    and AC.CONSTRAINT_TYPE = 'P'
    ORDER BY  u.table_name
    ,           u.column_name
    ;While it is possible to use both join styles in the same query, it's a really bad idea. I suggest always using ANSI syntax, especially for outer joins, but whatever style you choose, use it consistently for all joins in the same query.
    In this case, you want an inner join between tablec c and ac, so the ANSI syntax would be something like
    FROM  u  LEFT OUTER JOIN c ON ... JOIN ac ON ...In this case, it's very important that the inner join between c and ac is done before the outer join with u. How can you make sure that happens? Well, if you have an arithmetic expression such as
    12 * 5 - 1and you want to make sure the subtraction of 1 from 5 takes place before the multiplication by 12, what do you do? You can add parentheses:
    12 * ( 5 - 1 )In ANSI join syntax, you can use parentheses the same way:
    FROM  u  LEFT OUTER JOIN ( c ON ... JOIN ac ON ... )or, in full:
    SELECT    u.table_name
    ,        u.column_name
    ,        c.constraint_name
    ,       ac.constraint_type
    FROM             user_tab_col_test      u
    LEFT OUTER JOIN  (
                             all_cons_columns_test  c
               JOIN  all_constraints_test   ac
                                 ON   ac.table_name     = c.table_name
                          AND  ac.constraint_name     = c.constraint_name
                            ON    u.table_name       = c.table_name
                   AND   u.column_name       = c.column_name
                   AND   ac.constraint_type  = 'P'
    WHERE       u.table_name     = 'table1'
    ORDER BY  u.table_name
    ,            u.column_name
    ;Output:
    TABLE_NAME COLUMN_NAME CONSTRAINT_NAME CONSTRAINT_TYPE
    table1     column1     primary         P
    table1     column2
    table1     column3
    table1     column4

Maybe you are looking for

  • How do I transfer/sync an email account from my iphone to my mac mini?

    Hi all, I've set up a new email account on my iphone 5 and want this email account to be set up on my Mac mini aswell.  I have connected my iphone to my my mac as I thought it may sync automatically but it didn't.  I'm a new mac user and still gettin

  • Word wrap in Coldfusion Builder 3?

    Does anyone know where/how to turn on word wrap in CFBuilder 3? I'm on the Mac, OSX 10.9.2 Thanks, Rich

  • CSS Center gallery caption & add max size

    I'm working on revamping my horrible webpage (if you want a laugh look at the home page code). It was the best I could cobble together 5 years ago. But I've been taking tutorials. etc... And getting better at css. So I want to start fresh. On my new

  • IPhone 6 ringtone issue

    I am unable to change the ringtone on my iPhone 6. It shows on the screen that I have set a new ringtone but does not actually change the ringtone. Bug or something else??

  • Activate search icon in easy DMS

    Dear all, In easy DMS, Search object ICON is not active for some SAP object like sale order, assect ,hr object but it is active for vendor, customer, wbs. Kindly let me how can i activate  search icon in object link tab in easy DMS Rgds