Data type can be same base on the table source for blank column

We have an employee as mentioned structure table.

EMPNO NUMBER 4,
ENAME VARCHAR2 (10),
USE VARCHAR2 (9).
MGR NUMBER 4,
HIREDATE DATE,
SAL NUMBER (7.2).
NUMBER (7.2), COMM.
DEPTNO NUMBER (2)

I want to create a basic view on the length of data type of same/exact structure. So is it possible that when the view was created, we can define a data type.

In fact, I need to create a view based on above structure but want get deptno and sum of the salary of emp table column, and the rest of the column will be blank.

Thank you

You can use CAST

create or replace view vu1 as
select cast(null as  VARCHAR2(10) ) as ENAME,
 ....

Tags: Database

Similar Questions

Maybe you are looking for