can't create foreign key in sqlite I'm trying to run this code in sqlite: 

sqlite&gt; CREATE TABLE test(id integer primary key AUTOINCREMENT, page varchar(10), dp_record_id integer, foreign key (webserver_id) REFERENCES target_dp(id));


But I'm getting the following error message: 


  Error: unknown column "webserver_id" in foreign key definition


Here's the parent table: 

sqlite&gt; .schema
CREATE TABLE target_dp(id integer primary key AUTOINCREMENT, server_name varchar(255), location_code varchar(10), active bit(1));
sqlite&gt; 


I can't see where my syntax error is. 
Thanks in advance for your time.
You are missing a webserver_id column in the TEST table.

CREATE TABLE test(id integer primary key AUTOINCREMENT
                , page varchar(10)
                , dp_record_id integer
                , webserver_id integer
                , foreign key (webserver_id) REFERENCES target_dp(id));


Works just fine.