| Quick Search |
Use case for update the table value using sql query
Ex. table Gender_tbl and like this
id Gen_Name
1 Male
2 Male
3 Female
4 Femal
5 Male
no I have to update Gen_Name Male with M and Femal with F
solution:
UPDATE GENDER_TBL SET Gen_Name= (CASE WHEN (Gen_Name=’Male’) THEN ‘M’ WHEN (Gen_Name=’Female’) THEN ‘F’ else ‘ ‘ end)
Posted in Database
You can follow any responses to this entry through the RSS 2.0 Feed. You can leave a response , or trackback from your own site.