Link to home
Start Free TrialLog in
Avatar of lulu50
lulu50Flag for United States of America

asked on

Update all rows

hi,
I want to update all rows into one sql update statement.

update ChurchTbl set
CountryID = 2
where ChurchName = 'Åland';



2      Åland
3      Albania
4      Algeria
5      American Samoa
6      Andorra
7      Angola
8      Anguilla
9      Antarctica
10      Antigua and Barbuda
11      Argentina
12      Armenia
13      Aruba
14      Ascension Island
15      Australia
16      Austria
17      Azerbaijan
18      Bahamas
19      Bahrain
20      Bangladesh
21      Barbados
22      Belarus
23      Belgium
24      Belize
25      Benin
26      Bermuda
27      Bhutan
28      Bolivia
29      Bosnia
30      Bosnia and Herzegovina
31      Botswana
32      Bouvet Island
33      Brazil
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

lulu50,

Please explain, as your question is not clear.  That SQL statement looks OK on its own, and your sample data seems to indicate that you already have the result you wanted.

Patrick
Avatar of lulu50

ASKER

I want to have a sql statement that would implement the data
the data that you see is in the excel sheet not in the database
2      Åland
3      Albania
4      Algeria
5      American Samoa
6      Andorra
7      Angola
8      Anguilla
9      Antarctica

the SQL statement is to update one record but I want it to update all these records at once
If you truly mean ALL rows then remove the condition.


update ChurchTbl set
CountryID = 2;

Backup before testing.


Are you trying to update all records based on the value in a specific column of each record??

ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lulu50

ASKER

Thank you