How to swap the data of two columns in a table. both the
columns containing varchar values.
Answer Posted / sandeep rana
create table tmp_t
(
aa varchar2(50),
bb varchar2(50)
)
--insert into tmp_t values('1','5')
select * from tmp_t
update tmp_t set aa=bb , bb=aa
| Is This Answer Correct ? | 7 Yes | 12 No |
Post New Answer View All Answers
What is the function of sql server agent windows service?
What is public role in sql server?
Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.
what's the difference between delete table and truncate table commands? : Sql server database administration
How do I manually uninstall an instance of sql server 2016?
What is a derived table?
Explain syntax for viewing trigger?
Do you know what are various aggregate functions that are available?
SQL Server Architecture ?
What is measure group, measure? : sql server analysis services, ssas
How do I find query history in sql server?
What is sqlcmd?
Can we add our custom code in ssis?
What protocol does sql server use?
Is a primary key unique?