Re: How to do this?

From: <timhall1_at_gmail.com>
Date: Sat, 20 Apr 2013 14:04:16 +0000
Message-ID: <1425406295-1366466657-cardhu_decombobulator_blackberry.rim.net-1240489501-_at_b3.c6.bise6.blackberry>



Many possibilities, with DECODE and CASE being the most commonly used. When I benchmarked them many years ago, DECODE was a tiny bit faster than CASE on my systems/databases. Your mileage may vary... Next, I would tell the interviewer I hope I could get a lock on the table and had ample undo space available :)

HTH
Sent from my Verizon Wireless BlackBerry

-----Original Message-----

From: rajugaru.vij_at_gmail.com
Sender: oracle-l-bounce_at_freelists.org Date: Sat, 20 Apr 2013 13:48:06
To: <Oracle-L_at_freelists.org>
Reply-To: rajugaru.vij_at_gmail.com
Subject: How to do this?

Hi all,
I just attended an interview, where I answered lot of questions, but struggled to answer only one.

If I have a table which has a column gender, and I have only 'm' and 'f' in that, how to change all 'm's into 'f' and vise versa, with a single sql statement?

Any thoughts?

Sent on my BlackBerry® from Vodafone--
http://www.freelists.org/webpage/oracle-l

--

http://www.freelists.org/webpage/oracle-l Received on Sat Apr 20 2013 - 16:04:16 CEST

Original text of this message