I am trying to run a query in which a particular column value is a foreign key.
INSERT INTO tbl_test(group_id, test_name, test_code) VALUES (SELECT group_id FROM tbl_group
where group_code = '6868' , 'test', '123');
This is my query. On executing this query i'm getting an error as
ERROR: syntax error at or near "SELECT"
LINE 1: ... tbl_test(group_id, test_name, test_code) VALUES (SELECT group
I am not sure where i am doing wrong. Please help me on this.