Create user defined type in oracle
CREATE OR REPLACE TYPE "CUSTOMER_NAME" AS OBJECT(FIRST_NAME VARCHAR2(20),LAST_NAME VARCHAR2(20))
/
used following code for data insertion in the table.
INSERT INTO STAFF_INFO(STAFF_NAME,STAFF_PWD) VALUES (CUSTOMER_NAME('" & fname.Text & "','" & lname.Text & "'),'" & password.Text & "')"
but, when i'm trying
select STAFF_ID,STAFF_PWD,CUSTOMER_NAME(FIRST_NAME,LAST_NAME) from staff_info
getting error ORA-00904: "LAST_NAME": invalid identifier
and when i'm trying this
select * from staff_info
then, i'm getting this error ORA-00932: inconsistent datatypes: expected NUMBER got ADS.CUSTOMER_NAME
need help !!