473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Re: how quick query can be

update (select b.b2 from b where b.b1 = a.a1) set a2 = b2

Ok, now correct.
Can you propose something quicker now ?

<sy******@yahoo.comwrote in message
news:a1**************************@posting.google.c om...
"Julia Sats" <ju********@sympatico.cawrote in message
news:<ij******************@news20.bellglobal.com>. ..
I have two tables A(a1 number, a2 number) and B(b1 number, b2 number)
a.a1 and b.b1 are join columns .
I need to update values of a2 by values of b2.

we can use such update quere
update A set a2 = (select b.b2 from b where b.b1 = a.a1)

Can you propose something quicker ?

Thanks

Switch to a different database. Your query is incorrect too.

Sybrand Bakker
Senior Oracle DBA

Jun 27 '08 #1
2 862
Yak
"Julia Sats" <ju********@sympatico.cawrote in message news:<jt******************@news20.bellglobal.com>. ..
update (select b.b2 from b where b.b1 = a.a1) set a2 = b2

Ok, now correct.
Can you propose something quicker now ?

I can not see any sense in what you wan't to do, can you be more
specific ?

Do you just want to duplicate your table ?

Drop Table A
Create Table A as Select * from B

or do you have two tabels that should have the same data after every
change ? Then use a trigger on table A wich also changes table B
Jun 27 '08 #2
mo************@gmx.de (Yak) wrote in message news:<d2**************************@posting.google. com>...
"Julia Sats" <ju********@sympatico.cawrote in message news:<jt******************@news20.bellglobal.com>. ..
update (select b.b2 from b where b.b1 = a.a1) set a2 = b2

Ok, now correct.
Can you propose something quicker now ?


I can not see any sense in what you wan't to do, can you be more
specific ?

Do you just want to duplicate your table ?

Drop Table A
Create Table A as Select * from B

or do you have two tabels that should have the same data after every
change ? Then use a trigger on table A wich also changes table B
Tables A and B do not contain only by 2 fields each. At this case drop
table A and create it again as select from B do not work. At this case
has to be updated only one column without change other data.
BTW select count(*) from A and select count(*) from B can be
different.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.