I have a table Ty contains:
a integer NOT NULL,
b text,
c text,
d text,
e text
I'm trying to do insrert statment as follows:
insert into Ty (b,c,d,e) values
('hello','world',select current_date,select name from users where userid=4)
But it doesn't work. It says:
ERROR: syntax error at or near "select"
All guides I read says that I can do SQL statement in Insert as long as they return just one value. So why it doesn't work?