mysql - Update query SQL to update various fields of table? -


यह मेरी मेज है:

  आईडी वितरण_मॉड पुराना_निर्धारण_मोड 123 ईमेल एसएमएस 126 एसएमएस एसएमएस 13 9 ईमेल  
  sms = 100 email = 200 facebook   

मैं अपने टेबल फ़ील्ड मानों को इन मानों के साथ अद्यतन करना चाहता हूं:

  sms = 100 email = 200 facebook = 300  

ऐसा है कि:

  आईडी वितरण_मोड पुराना_ डिलीवरी_मोड 123 200 100 126 100 100 13 9 200 300 147 300 200 198 100 100 210 100 200  

मैं इसे एक एकल क्वेरी में करना चाहता हूं।

मैं इसे कैसे कर सकता / सकती हूं?

< Div class = "post-text" itemprop = "text"> <पूर्व> अद्यतन करें your_TABLE_NAME SET delivery_mode = केस जब delivery_mode = 'sms' तब '100' WHEN वितरण_मॉड = 'ईमेल' तब 'delivery_mode =' facebook 'THEN' 300 'WHEN डिलीवरी _ मोड पर डिलीवरी_मैड END, old_delivery_mode = मामला जब old_delivery_mode =' sms 'तब' 100 'WHEN old_delivery_mode =' email 'तब' 200 'WHEN old_delivery_mode = 'फ़ेसबुक' THEN '300' WHEN पुरानी _ डिलीवरी_मोड THEN पुरानी _ डिलीवरी_मैड END


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -