Jump to content

Recommended Posts

Posted

okka query rayali .. like adding a column to the  table here is the scenario

 

okka coulmn ids vunnayi like {23,5,1,8,236,457,654,459.... so on} if ids are {23,5,1,236,457,} then newly added column should have value 1 else o...ela rastham query lo.

 

 

nenu already new field addchesanu but akkada value ela add cheyali ani thinking with respective of this condition.

Posted

if ids are {23,5,1,236,457,}  only 5 ids ey kabatti 

you can also insert a case statement also

 

 

Posted

UPDATE TABLE

SET FLAG=1

WHERE ID IN (23,5,1,236,457)

Posted

CASE WHEN ID IN(23,5,1,236,457) THEN 1 ELSE 0 END AS NEWCOLUMN

Posted

Bhayya same elane rasanu... ayithey nenu rasindhi correct annamata :)

UPDATE TABLE

SET FLAG=1

WHERE ID IN (23,5,1,236,457)

 

×
×
  • Create New...