Reputation: 3514
I am doing a simple insert through .bat file. But It's not executing the second statement.
sqlplus scott/tiger
insert into dept values (60, 'Support', 'Redwood');
How can I run the second statement? I must be missing something.
Upvotes: 2
Views: 3281
Reputation: 186
To get it all to work from the .bat file, you need something like this:
@echo insert into dept values (60, 'Support', 'Redwood'); | sqlplus scott/tiger
Upvotes: 1
Reputation: 3054
Assuming your columns are correct for insertion Here is what I would do.
sqlplus scott/tiger @c:\yourSqlScript.sql
exit
Then in your "yourSqlScript.sql", you have
insert into dept values (60, 'Support', 'Redwood');
exit
Upvotes: 2