how can i create a user defined datatype

Answer Posted / avi007

We can create a user defind datatype by using abtract
datatype.

create type address_type as object
( street varchar2(10),
pincode number(6);
);

This is used in

create table emp
(Empname varchar2(20),
Adress address_type);

// address_type is user defined datatype

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can a varchar be a primary key?

697


What are variables in pl sql?

786


Why do we use sql constraints? Which constraints we can use while creating database in sql?

723


How do you write a complex sql query?

777


What has stored procedures in sql and how we can use it?

764






What is the difference between nvl function, ifnull function, and isnull function?

796


what is the difference between cluster and non cluster index? : Sql dba

730


Is sql scripting language?

725


What is sap sql anywhere?

680


Is left join inner or outer?

757


What types of commands can be executed in sql*plus?

764


What is database sql?

707


What is sqlcommand?

751


Can procedure in package be overloaded?

837


What are the three pl sql block types?

719