views:

35

answers:

1

Hi, This is my query,

  CREATE VIEW employee_vu AS(
  SELECT employee_id,last_name "employee",department_id
  FROM employees);

I am giving alias of columns in lower case ,and in it is stored in lower case after doing desc i have confirmed.

But when i am trying to select this column employee :error occurs

EMPLOYEE: invalid identifier

Since all column name is stored in upper case ,is this the problem,Please explain what is the concept behind!

+4  A: 

You would need to select it using double quotes and matching case:

select employee_id, "employee", department_id from employees;

That's why creating columns with double quoted identifiers is considered bad practice in Oracle.

Tony Andrews