An old question, but I believe that these resources can help more visitors.
The ISO639-3 standard is ridiculously extensive to support every language humanity has ever conceived; colloquial, iconic, modern and extinct. Therefore, the ISO639-2 standard is much more suitable for most cases.
The ISO639-2 standard can be downloaded here *.
Regarding demographics and ethnicity, Countrylist.net has great resources for all of them, from a geographical point of view. I often use this list in my projects.
* Lists are separated by channel, so they are not SQL queries, but can be easily imported this way:
-- Create table to hold the data. create table language ( id int(5) unsigned auto_increment primary key, bibliographical char(3) not null, terminological char(3) default null, alpha2 char(2) default null, name_en varchar(80) not null, name_fr varchar(80) not null ) engine=innodb default charset=utf8; -- Fill the table with the ISO-639-2 data. load data local infile "ISO-639-2_8859-1.txt" into table language fields terminated by "|" (bibliographical, terminological, alpha2, name_en, name_fr);
source share