-
Question about DATE format (Q190 in TK) 1Z0-007
Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
Which INSERT statement is valid?
A)INSERT INTO employees (employee_id, first_name, last_name, hire_date)
VALUES ( 1000, ‘John’, ‘Smith’, ‘01/01/01’);
B)INSERT INTO employees(employee_id, first_name, last_name, hire_date)
VALUES ( 1000, ‘John’, ‘Smith’, ’01 January 01’);
C)INSERT INTO employees(employee_id, first_name, last_name, Hire_date)
VALUES ( 1000, ‘John’, ‘Smith’, To_date(‘01/01/01’));
D)INSERT INTO employees(employee_id, first_name, last_name, hire_date)
VALUES ( 1000, ‘John’, ‘Smith’, 01-Jan-01);
ANSWER: TK says A
In my opinion the default repsetation of the date in Oracle is like this: '01-JAN-01' . But it doen't exist in the answers.
I've tried A, but got the following error:
ORA-01843: not a valid month
any opinion?
-
My opinion is that's a horrible question dependant on the characterset you are using.
Jeff Hunter
-
What do you mean? Do you mean that the default date format is somehow dependant on the character set (regional settings etc.)?
-
-
You have to set the parameter NLS_DATE_FORMAT to use the date parameter. You can use
show parameter nls_date_format this will show you the format that is in use.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|