I am trying to do insert to a table and it uses one select statement for one column. Below is the illustration of my query.
INSERT INTO MY_TBL (MY_COL1, MY_COL2)
VALUES (
(SELECT DATA FROM FIR_TABL WHERE ID = 1 AND ROWNUM = 1 ORDER BY CREATED_ON DESC),
1
);
It throws ORA-00907 Missing right Parenthesis
. If I remove ORDER BY
from this, it works as expected. But I need order it. How can I fix it?