Having spent WAY more time building this as appropriate for last hours of Friday, I decided to put this SQL script on the web for everyone.
This are SQL statements for filling countries table. Tables includes numeric, alpha-2 and alpha-3 ISO codes. Adjust table and column names to your standards and you're good to go. Script is tested on Microsoft SQL Server but it should run / be easily adjustable for any other database.
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (4, 'AF', 'AFG', 'Afghanistan')
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (248, 'AX', 'ALA', 'Aland Islands')
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (8, 'AL', 'ALB', 'Albania')
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (12, 'DZ', 'DZA', 'Algeria')
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (16, 'AS', 'ASM', 'American Samoa')
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (20, 'AD', 'AND', 'Andorra')
INSERT INTO Country (CountryID, ISO2, ISO3, Name) VALUES (24, 'AO', 'AGO', 'Angola')
...
(click for full script)
Compiled from Wikipedia ISO 3166-1 article, last updated on 23rd of May 2008.
Here is also "create table" script for for quick start.
create table Country (
CountryID int not null,
Iso2 char(2) not null,
Iso3 char(3) not null,
Name varchar(100) not null,
constraint PK_COUNTRY primary key nonclustered (CountryID)
)