"ORA-00928: missing SELECT keyword" error while using sequence function
Your statement is wrong. Simple as that. With this fixed statement:
insert into iowe(name, amount, "Serial Number") values('XXX', 500, iowesqn.nextval)
You probably meant to replace your values by variables, not your fields?
insert into iowe(name, amount, "Serial Number") values('&name', &amount, iowesqn.nextval)
Other users may have been using value
in stead of values
. This is another case when you may face this problem.
I just found another case where I get "missing SELECT keyword". I tried to insert with the column names in quotes, like this:
insert into subscription ('SUBSCRIPTION_ID','SUBSCRIPTION_NAME','CREATED_DATE') values ('558768','','20-JAN-20 10.37.47.901000000 PM');
Once I removed the quotes around the column names, it worked:
insert into subscription (SUBSCRIPTION_ID,SUBSCRIPTION_NAME,CREATED_DATE) values ('558768','','20-JAN-20 10.37.47.901000000 PM');