Jump to content

update column data according to a query based on existing column


dflow

Recommended Posts

i have a CityName Column in an old products table

 

i would like to create a CityID according to the cityname and update the CityID column

 

i have city_list table

with CityID as primary

CityName

 

products table

ProductID as Primary

CityID (Blank INT)

CityName(with cityname varchar)

 

so insense have

CityName=Amsterdam=CityID=1

how can i run an update column CityID according to city_list cityname

hope im clear

 

thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.