Home » SQL & PL/SQL » SQL & PL/SQL » how to
how to [message #39165] Sat, 22 June 2002 17:23 Go to next message
Shah
Messages: 36
Registered: June 2002
Member
hi

iam trying to update by selecting a column from a table
ex:
update tableA set testername =
(select decode(b.tcode, 1, 'newtester') from tableA a, tester b where a.testid = b.testid)

is this right?, if not how?

appreciate any help
Re: how to [message #39166 is a reply to message #39165] Sat, 22 June 2002 17:28 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
it should work

SQL> ed
Wrote file afiedt.buf

1* update emp set sal=(select max(sal) from emp)
SQL> /

14 rows updated.
Previous Topic: insert to user_tab_comment
Next Topic: Finding the Second largest value from a column
Goto Forum:
  


Current Time: Fri Apr 26 22:40:35 CDT 2024