how to insert values in a table with foreign key field I am creating a database where I have a table with a foreign key. I am using the following command:

insert into ques_bank 
    (q_no, uid, question) 
values 
    (NULL, select uid from user_info where username ='more','jdkjfsd dkskdsn skdjsd');


But it gives a syntax error. 
I am having troubles with foreign key. Any help will be appreciated.
There is no information on the definition of your table (what foreign key?) but based on your SQL you should use a select to enter it:

insert into ques_bank 
    (q_no, uid, question) 
select null, uid, 'jdkjfsd dkskdsn skdjsd' from user_info where username ='more';


or:

insert into ques_bank 
    (uid, question) 
select uid, 'jdkjfsd dkskdsn skdjsd' from user_info where username ='more';