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

What is the difference between microsoft sql and mysql?

514


When can we use the where clause and the having clause?

584


What are the string functions in sql?

532


Explain the difference between rename and alias?

545


What is the use of prepared statement?

542






What can you do with pl sql?

569


Why cannot I use bind variables in ddl/scl statements in dynamic sql?

671


Can sql developer connect to db2?

587


Is big data nosql?

514


How can we implement rollback or commit statement in a trigger?

582


Does truncate table reset auto increment?

528


What is string join?

559


How to rename a column in the output of sql query?

539


How will you distinguish a global variable with a local variable in pl/sql?

626


What does inner join mean?

558