how can we replace the particular column value of a resulted
set of executed query? I mean write down a sql query to
chane the particular column's value of a resulted set of
executed query
Answers were Sorted based on User's Feedback
Answer / m.raghu
by using sub query answer is
update table1 set col1=(select col2 from table2 where
<cond>)
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / mglbayar
UPDATE (SELECT t1.col1 c1, t2.col1 c2
FROM table1 t1, table2 t2
WHERE t1.pk = t2.fk AND more_condition)
SET c1 = c2;
Is This Answer Correct ? | 2 Yes | 1 No |
select decode(salary,2500,1000,3000,2500, 3000) from
employees;
This query will replace the salary column value from
employees.
If the salary is 2500 then 1000 is displayed in the
resultset, else if 3000 then 2500 will be displayed esle
2000 is displayed.
Is This Answer Correct ? | 0 Yes | 0 No |
What is dba in sql? : SQL DBA
what is bulk bind
what is the order of pre-defined exceptions.
What are the query optimization techniques?
Name the different types of indexes in sql and define them.
wt is the diff b/w greast and max ,least and min? wt is the diff b/w case and decod?
4 Answers Oracle, TCS, Tecnics,
What is the difference between left and left outer join?
what is global table
What is the difference between unique and primary key constraints?
What are the different schemas objects that can be created using pl/sql?
What is the difference between having and a where in sql?
How to fix oracle error ora-00942: table or view does not exist