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 |
- Types of triggers - View - Dcl - Procedures, packages, functions - Metasolve - Can use Dcl in triggers - package case study - Cursor and its types - triggers schedule - Wrap - Why we are using fetch and for in cursor. difference?
how to convert numeric values to character strings? : Sql dba
can i use dbms_output.put_line in a function u are telling as return statement
What is the main difference between sql and pl/sql?
How does cross join work in sql?
What do you mean by field in sql?
What is a primary key called that is made up of more than one field?
how to find 5th row ?
25.67,-1 Trunc = 20 Round= 30 HOW????
What is a full join sql?
what is Difference between Having and Where clause?
what is the difference between where clause and having clause? : Sql dba