can update us two columns from a single table at a time

Hi all

We can write an update on towing both columns

as set of update < table name > < Column1 > = 'xx' and < colmn2 > = "uu" where < Column3 > 'rrr '.


Thank you

You can.

Like this

 update  set ='xx' ,='uu' where 'rrr'

Concerning
Sankar MN

Tags: Database

Similar Questions

  • update of two columns at once

    HI can update us two columns at once by the regular update by mentioning two where clauses with respect to columns

    The where clause decide which set of lines will be updated.
    For example, if the set of rows is not the same for your two columns you must use two sentences--update.
    If the rowset is the same for your two columns you can use a single update statement (but then the where clause will be the same).

    Published by: 87076 on 31.01.2011 02:52

  • can I save two devices on a single iCloud?

    can I save two devices on a single iCloud?

    Yes, if they use the same account Apple ID (iCloud).

    http://www.Apple.com/icloud/Setup/

  • can I have two apple on a single device ID

    can I have two apple on a single device ID

    Hi, no you can use only a single iD associated with a single device.

  • can perform us two actions with a single button in two clicks, one after the other?

    Mr President.

    can perform us two actions with a single button in two clicks, one after the other?

    I want that when I click on the button Add once it add data to the database and when I click again on this button it clears the form data to the empty fields.

    Concerning

    Tanvir

    In the code, it should be easy.

    The following code adds that a button called butman with text 'ADD '.
    It then registers a listener that will be called if the user clicks the button.

    This listener then calls the runAddData method if you clicked butman while it contained the text of "ADD" and it calls the runClearData method otherwise.
    That's why he will swap the functionality of the button between ADD and CLEAR on each click.

    final Button butman = new Button("ADD");
    butman.setOnAction(new EventHandler() {
              @Override
              public void handle(ActionEvent t) {
                        if (butman.getText().equals("ADD")) {
                                  butman.setText("CLEAR");
                                  runAddData();
                        } else {
                                  butman.setText("ADD");
                                  runClearData();
                        } // END IF-THEN
              }});
    

    I hope that's what you wanted.

    Further reflection.
    You might want to run the ADD and CLEAR methods in their own son so that it can run in the background without slowing down your user interface.

    I also reuse rather a single button for several features instead of to apply with hundreds of nodes used only rarely with masses of code to show and hide as needed.

  • Single line based on two columns and a single column

    Dear members,

    I have a table that contains duplicate rows, for which a request should be able to extract the unique row in the table. Here the unique is not based on a single column, but it should be in two columns and also check on the uniqueness on a column.

    create table addr (varchar2 (10) firstname, lastname varchar2 (10), area varchar2 (3));

    insert into values addr ('bob', 'james', 1');
    insert into values addr ('bob', 'james', 1');

    insert into values addr ('harry', 'bert', ' 1');
    insert into values addr ('jimmy', 'bert', ' 1');

    insert into values addr ('sam', 'mac', '1');
    insert into values addr ('sam', 'Knight', '1');

    insert into values addr ('tom', 'sand', '1');
    insert into values addr ("cat", "mud", "1");


    The query output must contain 3 lines.

    Bob - james
    Harry - bert or jimmy - bert [or the other of them], but not both
    -Mac or sam - Sam Knight [or the other of them], but not both
    Tom - sand
    Cat - mud

    SELECT firstname, lastname as total area WHERE addr = '1' GROUP by firstname, lastname; It takes no duplication of single column...

    Any suggestions...
    SQL> with t_data
    as
    (
    select 'bob' as firstname, 'james' as lastname, '1' as area from dual union all
    select 'bob', 'james', '1' from dual union all
    select 'harry', 'bert', '1' from dual union all
    select 'jimmy', 'bert', '1' from dual union all
    select 'sam', 'mac', '1' from dual union all
    select 'sam', 'knight', '1' from dual union all
    select 'tom', 'sand', '1' from dual union all
    select 'cat', 'mud', '1' from dual
    )
    SELECT
            firstname,
            lastname,
            area
    FROM
            (
                    SELECT
                            t.*,
                            row_number() over(partition BY firstname order by 1) rn,
                            row_number() over(partition BY lastname order by 1) rn1
                    FROM
                            t_data t
            )
    WHERE
            rn     = 1
    AND rn1 =1 ;  
    
    FIRSTNAME       LASTNAME        AREA
    --------------- --------------- ----------
    bob             james           1
    cat             mud             1
    jimmy           bert            1
    sam             knight          1
    tom             sand            1
    
    SQL>
    
  • Can we use two columns AS a command

    Dear all,

    Please suggest

    I have two columns of different table and I want to make a general query selection of values in a table based on one exact string of others. Please find the following query:

    Select a.col1, b.col2
    FROM table1, table2 b
    where a.clo3 like b.col4;

    Now a.col3 values can be like "asbd %" or "qw %" or "% zx.
    where, as in b.col4 it will be asbd or qw or zx.

    Please suggest what I would do.

    Thanks in advance.
    Ankit Rana

    Hi, stone.

    Yes, you can use LIKE this way.

    Do not forget that AS is asymmetric:

    x LIKE y
    

    is usually not the same as

    y LIKE x
    

    because wildcard characters ('%' and '_') have a special meaning in the right operand, which is the expression that comes after LIKE.

    Anky rana says:
    Dear all,

    Please suggest

    I have two columns of different table and I want to make a general query selection of values in a table based on one exact string of others. Please find the following query:

    Select a.col1, b.col2
    FROM table1, table2 b
    where a.clo3 like b.col4;

    Now a.col3 values can be like "asbd %" or "qw %" or "% zx.
    where, as in b.col4 it will be asbd or qw or zx.

    So, it seems that you have to reverse the operands of TYPE:

    where   b.col4  like a.clo3;
    

    By the way, it's a matter of SQL, so a better forum for that would be the [SQL and PL/SQL forum | http://forums.oracle.com/forums/forum.jspa?forumID=75].

  • Can I merge two Collections into a single?

    I have two Collections with similar content... "Oldies" with 138 photos and "Oldies 2" with 93. Maybe I should mention that a few photos in the two Collections.


    I want to select and move 'Oldies 2' in 'Oldies' photos by dragging them in the "Oldies".

    I then would be left with "Oldies" containing 231pics and "Oldies 2" with it's 93 photos.»

    Here's my problem... I would need is more 'Oldies 2' in my Collection can I remove it and he is happy with 150 photos? Or will they removed in 'Oldies' too?

    Cliff

    Screen Shot 2015-11-10 at 5.03.33 p.m..png

    If you open 2 Oldies and select all (Ctrl-A or Cmd - A), and then drag these photos in Oldies, you have combined the two collections into a single. Once you are sure that it has been a success, you can remove Oldies 2 without problem.

  • The combination of two columns in a single

    Hi guys,.

    Is it possible for a query to combine two columns into one? For example, lets say I have the following query:

    SELECT ID, FIRST_NAME, LAST_NAME
    EMPLOYEES

    I want the output to have two columns: one that contains the ID and the other containing name followed by a space followed by LAST_NAME. I know how to do this outside the query using coldfusion, but it save me a lot of work if there is some way that the query could do for me.

    Yes but the operand of concatenation varies somewhat from a database
    management system to the other.

    In Oracle, it would look this IIRC.

    SELECT ID, FIRST_NAME. ' ' || LAST_NAME AS FULL_NAME
    EMPLOYEES

  • Remove the column from the compressed tables

NLSRTL11.2.0.3.0Production
Oracle Database 11g Enterprise Edition11.2.0.3.064 bit Production
PL/SQL11.2.0.3.0Production
AMT for Linux:11.2.0.3.0Production

Hello

I read on how to do to remove a compressed table column - first set unused and then drop unused columns. However, in the example below on the basis of data, I ran it, it does not work. Please, can you tell me WHEN this approach does not work. What is dependent on - settings or something else. Why can't I drop unused columns?

And the example and errors:

create table tcompressed compress in select * from all_users;

> TCOMPRESSED table created.

ALTER table tcompressed add x number;

> table TCOMPRESSED altered.

ALTER table tcompressed drop the x column;

>

Error report:

SQL error: ORA-39726: unsupported operation column add/drag on compressed tables

39726 00000 - "operation column add/drop not supported on compressed tables. ''

* Cause: Not support add/column operation move compressed tables

elapse.

* Action: When adding a column, do not specify a default value.

DELETE column is only supported in a column SET UNUSED

(remove the column metadata).

ALTER table tcompressed unused column of the set x;

> table TCOMPRESSED altered.

ALTER table tcompressed drop unused columns;

>

Error report:

SQL error: ORA-39726: unsupported operation column add/drag on compressed tables

39726 00000 - "operation column add/drop not supported on compressed tables. ''

* Cause: Not support add/column operation move compressed tables

elapse.

* Action: When adding a column, do not specify a default value.

DELETE column is only supported in a column SET UNUSED

(remove the column metadata).

As you can see even after changing the table defining the column as unused X I still can't drop by DROP UNUSED COLUMNS.

Thank you.

If you enable compression for all operations on a table, you can delete the columns in the table. If you enable compression for the only direct-path inserts, you can't remove columns.

  • Two BLOBs in a single table

    So, I have a table:

    BLOB_TABLE
    Number of BLOB_ID automatically triggered (sequence primary key)
    BULLETIN BLOB
    BULL_FILE VARCHAR (255)
    BULL_MIME VARCHAR (255)
    DATE OF BULL_LAST_UPDATE
    SUPERFORM BLOB
    SUPER_FILE VARCHAR (255)
    SUPER_MIME VARCHAR (255)
    DATE OF SUPER_LAST_UPDATE

    When I try to view a BLOB, it will show only the last BLOB responsible for this record.

    Can I store two types of BLOB data in a table? It doesn't seem to matter how I even try to show (even using the 'Download' link attached to traverse file).

    Or I have to create two tables and link them together (I'd rather not do that if I have to).

    Please notify.

    Hello

    Maybe I just misunderstood your question, but on

    Apex. Oracle.com

    workspace: put
    user: guest
    Pass: apex1234

    request blobtest - pass to page 2!

    I just download 2 different blobs at once...

    ---

    Take a look at the defs of the ID column (which I have 2 times) - here in the format you add WHICH column to download: DOWNLOAD: BLOBTEST:BULLETIN:ID (for the first id)

    concerning
    Mette

    Published by: Mettemusenss on 2010-02-19 10:14

  • Update the same column in the same table

    Hello

    How do update you a records of column in the same table?

    I have purchase_order of the table. Consists of column ID, color, Purchase_No, Sub purchase.


    < pre >

    Create table Purchase_Order)
    Identification number,
    color varchar2 (10),
    purchase_No varchar2 (5).
    purchase_sub varchar2 (2));
    < / pre >

    < pre >

    ID color Purchase_No purchase Sub
    6416 S1406 PURPLE 3
    6415 S1406 GREEN 2
    6414 S1406 GREEN 1
    6419 S1406 3
    6417 S1406 1
    6418 S1406 2

    < pre >

    6 unique ID records is in the same site. But 2 ID will be confined to a purchase_sub.

    For example

    6416,6419 purchase_no S1406 but has the same purchase_sub who need 3.I 6419 color "Purple".

    Expected results:
    < pre >

    ID color Purchase_No purchase Sub
    6416 S1406 PURPLE 3
    6415 S1406 GREEN 2
    6414 S1406 GREEN 1
    6419 S1406 PURPLE 3
    6417 S1406 GREEN 1
    6418 S1406 GREEN 2

    < / pre >

    Thank you!

    Published by: CrackerJack on May 4, 2009 15:04

    Hello

    Try this,

    UPDATE Purchase_Order a
       SET a.Colour = (SELECT colour
                         FROM Purchase_Order b
                        WHERE a.Purchase_Sub = b.Purchase_Sub
                          AND b.colour Is Not Null)
     WHERE a.Colour Is Null
    

    Kind regards
    Christian Balz

  • How can I keep an iPhoto library, update on two Macs without copying the entire library every time?

    Sorry if this has been asked several times before, I looked but could not find an answer to my specific questions...

    Currently, I keep my iPhoto on two different Macs library by periodically copy the package to the main computer entire iPhoto library to an external hard drive, then loading into iPhoto on the second machine.

    The problem is that it takes a lot of time and I find myself doing less, which means that I am often without recent photos I want to join the second Mac. Is there a way to copy only the new pictures/videos added since the last copy was made on the hard drive, which I can then add to the library on the second machine without replacing the entire library?

    I was wondering if it was possible to use the software of incremental backup to backup on the external drive that I could then use to update the second mac. In this case would be that I have to replace the entire library on the second mac every time, but at least it would be a faster process that also copy entire library since the first mac in the first place.

    Or I can just select the most recent photos and videos in iPhoto and batch export via the external hard drive to the second mac? I think I read that this is not copy all information such as good changes? Or am I wrong?

    If none of this is possible in the way that I'm demanding, could someone suggest an alternative photo storage software for Mac that I can have more control on?

    Yes, you can use an incremental backup or clone (like Carbon Copy clone or SuperDuper) program for updating the second library - this will not libraries merge in order to not do that is you make changes to the second library on this machine - it only makes library 2 exactly as 1 library each time that you run

    LN

  • How to upgrade all the updates of Windows XP from a single package?

    Original title: Windows XP updates

    Is there an SP4 or a package that contains all of the updates of Windows XP after SP3 is released?  It would be extremely useful to update all of the XP machines that do not have access to the internet.

    There will be a version called SP4 update by private parties. This update has been treated since September of 2012. Currently, they are still working on it. You can access this information to

    http://www.RyanVM.NET/forum/viewforum.php?f=5&SID=3058537efee42c994a4945a016f82cc3

    Hope this helps, they recommend you to read the info from the beginning. With files and information, you can create an ISO file that can be used to create a version of XP from microsoft that you can use in the future. I do not recommend to use a good firewall and antivirus program to protect your system like back up your system regularly.

    Personally, I'm going to build me a new computer.

  • XQuery to make two tags from a single tag

    Hi all

    I use OSB 11 g. I get an XML like this:

    < DOC >
    < INFO >
    < ATTRIBUTE ID = "name" >
    ABCD < VALUE > < / VALUE >
    < / ATTRIBUTE >
    <! - option - >
    < ATTRIBUTE ID = 'date' >
    < VALUE >
    29/09/09
    19/09/11
    < / VALUE >
    < / ATTRIBUTE >
    <! - option - >
    < ATTRIBUTE ID = "accNo" >
    < VALUE > 823748923987 < / VALUE >
    < / ATTRIBUTE >
    <! - option - >
    < ATTRIBUTE ID = "address" >
    < VALUE > XYZW < / VALUE >
    < / ATTRIBUTE >
    < / INFO >
    < / DOC >

    Only when the ID = "date", I want to change the ATTRIBUTE tag like
    < ATTRIBUTE ID = 'date' >
    < VALUE > 29/09/09 < / VALUE >
    < VALUE > 19/09/11 < / VALUE >
    < / ATTRIBUTE >

    Y at - it no XQuery to do this in OSB?

    Help, please!

    Thanks in advance!

    Kind regards
    Knockaert

    Try this: -.

    Assign [ ...]

    to [finalValueDate]
              
         
    For each [attribute] [./*:doc/*:info /...]
    ./*:DOC/*:INFO/*:ATTRIBUTE
    [body]
    Indexed by [undefined Variable] with countdown in [undefined Variable]
    Do)
              
    If ([$attribute/@ID...]
    $attribute/@ID = "date".
    )
    then)
         
         
              
         
         
    Assign [fn: normalize-sp...]
    FN:Normalize-Space($attribute/*:value/Text())
    on the [date]

    Replace [content of the node] [. / * [1]]
    ./*[1]
    in [finalValueDate] with [fn:substring($d...)]
    FN: Substring($date, 1, 8)
              
         
    Replace [content of the node] [. / * [2]]
    ./*[2]
    in [finalValueDate] with [fn:substring($d...)]
    FN: Substring($date, 10, 8)

    [Replace [whole node] of [". / / ATTRIBUTE[@ID="date "]]
    . ["/ / ATTRIBUTE[@ID="date "]
    in [body] with [ ...]
    {$finalValueDate / * [1] / text ()} {$finalValueDate / * [2] / text ()}
    )
    )
              
    It worked for me. I got the following response:


         
         
         ABCD
         

         
         
         29/09/09
         19/09/11
         

         
         
         823748923987
         

         
         
         XYZW
         

         

         

  • Maybe you are looking for