Showing posts with label Oracle Database. Show all posts
Showing posts with label Oracle Database. Show all posts
Saturday, February 14, 2009
Oracle DEFAULT DATE FORMAT
If you're looking for Oracle SQL's default date format, this is the right page for you.
Oracle SQL's Default Date Format is 'DD-MON-YY'.
In SQL*Plus prompt, type this command:
SQL> SELECT sysdate FROM dual;
The above query will return the system date. Its format is 'DD-MON-YY' which is the default date format of Oracle.
Thanks for visiting my blog.
- Millionaire Mind Ben de Leon
Thursday, February 12, 2009
How to run SQL script in Oracle SQL*Plus?
You might be seeking answers on this question: How to run a SQL script in Oracle SQL*Plus? You're very lucky for I know the answer to that question.
Let's create a new sql script file and name it runthis.sql. Let's assume that the following lines are the content of your runthis.sql file:
INSERT INTO phonebook(phone_id, phone_number,phone_name) VALUES(2,'09114563782','Ben');
INSERT INTO phonebook(phone_id, phone_number,phone_name) VALUES(3,'09114563783','Ken');
INSERT INTO phonebook(phone_id, phone_number,phone_name) VALUES(4,'09114563784','Len');
Save runthis.sql to C:\yoursqlfolder
Now, to run your sql file in Oracle SQL*Plus, just type the command below in SQL> prompt.
SQL>@C:\yoursqlfolder\runthis.sql
That's it. It's very simple to run sql script in Oracle SQL*Plus.
- Millionaire Mind Ben de Leon
Subscribe to:
Posts (Atom)
