bhupendra pratap singh

Hi,this is bhupendra pratap singh,belongs to Dehri-on-sone,bihar,Qualification,MCA,fron IEC College Of Engineering and Technology,Greater Noida.Professionally-Web Developer.

Wednesday, August 2, 2017

Mysql Query for swapping value in same column of table

UPDATE tablename SET fieldname  = CASE
    WHEN fieldname  = 'Y' THEN 'N'
    WHEN fieldname   = 'N' THEN 'Y'
    ELSE fieldname
    END
WHERE fieldname  in ('Y','N')
Posted by BHUPENDRA PRATAP SINGH at 10:03 PM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ▼  2017 (1)
    • ▼  August (1)
      • Mysql Query for swapping value in same column of t...
  • ►  2015 (1)
    • ►  January (1)
  • ►  2013 (7)
    • ►  June (3)
    • ►  April (2)
    • ►  March (2)
  • ►  2011 (3)
    • ►  November (1)
    • ►  September (1)
    • ►  July (1)

About Me

My photo
BHUPENDRA PRATAP SINGH
View my complete profile
Simple theme. Theme images by gaffera. Powered by Blogger.