i am new in sql and i want that , i have a table Customer
in which i added a new field Region
now i want to do some
alteration in SQL . I want to get all records Customer
and check on each
// This check will perfome for every customer let suppose we have our first customer
if currentcustomer.Country = US
{
UPDATE currentcustomer SET currentcustomer.Region=currentcustomer.id
}
else
{
UPDATE currentcustomer SET currentcustomer.Region=currentcustomer.ZIP
}
但我不知道如何对待所有顾客, 以及如何在Sql做这件事。