There is a table which contains all the employee details,
unfortunately there is mistake occured while entering the
data.
ex:
-------------------------------
empid empname gender address
-------------------------------
1 abcd f address1
2 defg m address2
3 ghth m address3
4 jkil f address4
write a update query that will change gender 'm' to 'f'
and 'f' to 'm'

Answer Posted / shahbaz maqsood

It isn't possible to me to write a single query.You can first assign another value like 'a' to one of two values.Then assign your required value to the other

"update table set gender='f' where gender='m'"

"update table set gender='m' where gender='a'"

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to call dll API sub routine in VB Form.

1909


how we can know the funcions available in a class recording java?

1750


what is diff bet ref variable & instance of class

1546


Write a program to find whether a given number is prime or not.

609


what are the differences between CONS, LIST, and APPEND

4760






How will you prove that java swing is multithreaded?

1698


3. What is the difference between testing and Quality Assurance?

1483


What's the difference b/w Table & Templete in Smartform?

1642


MOV.CB 007H,ADCON1 MOVE.CT 001H,_OPTION_REG_7 MOV.CB 007H,CMCON

1629


i am exeprienced person what is selection process

1131


what is class module in vb6? what it's use? with example..

1951


What is WEB 3.0? What are the features their in WEB3.0

1576


is it acceptable if we declare multiple exceptions in same overridden method.

2110


details description on this mantis? who is founder of this mantis?

1679


What is easiest way to get the PL/i compiler,I didn't have found the compiler in my library. Is there any extra cost if we want to access the PL/1 programs?Actually we r having Mainframe rented training Ids

1617