Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to Swap Two Tables?

Re: How to Swap Two Tables?

From: Turkbear <john.g_at_dot.spamfree.com>
Date: Wed, 29 Oct 2003 12:17:40 -0600
Message-ID: <kn00qv4nf0rv3trj2n8q9319ul3v6aapuc@4ax.com>


rekaben_at_yahoo.com (RK) wrote:

>"Anurag Varma" <avdbi_at_hotmail.com> wrote in message news:<9Q_lb.3878$n95.2249_at_news01.roc.ny>...
>> "RK" <rekaben_at_yahoo.com> wrote in message news:239f1935.0310231506.181e4b9c_at_posting.google.com...
>> > "nobody" <nobody_at_nowhere.com> wrote in message news:<7mUlb.253604$ko%.218644_at_news04.bloor.is.net.cable.rogers.com>...

>> > > tables t1 t2
>> > > rename t1 to t3;
>> > > rename t2 to t1;
>> > > rename t3 to t2;
>> > >
>> > > "RK" <rekaben_at_yahoo.com> wrote in message
>> > > news:239f1935.0310230807.5a9ccbc1_at_posting.google.com...
>> > > > Assuming space if not a problem, how can I exchange two table content
>> > > > (two table in same definition and structure) using SQL?
>> > > >
>> > > > RK
>> >
>> > Sorry. Maybe my first post question was unclear enough.
>> >
>> > I have two big tables. I want to compare the two table content to see
>> > if they are identical. If they are not, then I should exchange their
>> > content.
>> >
>> > Please tell me how I can do these two steps using SQL. And for the
>> > second step, if I am not allowed to create a temp table, how can I do
>> > it?
>> >
>> > Thanks.
>> >
>> > RK
>> 
>> This post is as unclear as the original post.
>> 
>> exchange means .. you want to put tableB's content into tableA and tableA's content into tableB.
>> Same as swap!
>> 
>> Now I have a feeling that you want to sync tableA from the contents of tableB.
>> i.e. At the end of it all you want to make tableA's content look exactly like tableB's content?
>> 
>> Does that reflect correctly what you wish to achieve?
>> 
>> Anurag
>>
>
>Well, this newsgroup may have some virus. After I posted my first
>question, I was bombed by bulk-email-spam.
>

No, the newsgroup does not have a virus..However there is a trojan out there ( on folk's workstations that have not been keeping up with threats and patches)
 that scans newsgroups for email addresses - So do NOT use your real email address when posting - spoof it in some way like rekabenatyahoodotcom
>Now return to my questions. Let me ask them one by one --
>
>Fist One:
>
>With SQL, how can I compare two table content to see if they are
>identical or not? If not, can I show their difference using certain
>SQL commands and dump the output?
>
>Thanks.

I am not sure that SQL alone can do that - There are 3rd party apps out there that can ( I seem to remember one called OraCompare - a google search should find out if it still exists) Received on Wed Oct 29 2003 - 12:17:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US