how to create object in plsql
Answers were Sorted based on User's Feedback
Answer / madhavi
SQL> set serverout on
SQL>
SQL> create or replace
2 type new_person as object (
3 last_name varchar2(100),
4 phone varchar2(100),
5 member function get_last_name return varchar2,
6 member function get_phone_number return varchar2 )
7 not final
8 /
Type created.
Is This Answer Correct ? | 11 Yes | 0 No |
Answer / chandu
create type addresstype as object
(hno varchar2(5),street varchar2(10),
city varchar2(10),pin varchar2(5));
Now we use this object in creating table like this.
create table employee(empno number(5),job varchar2(10),sal
number(5),empaddress addresstype);
insert into employee
values(101,'clerk',6000,addresstype('114a','gandhi','hyd',50001));
Is This Answer Correct ? | 0 Yes | 0 No |
How is a process of pl/sql compiled?
what is the difference between myisam static and myisam dynamic? : Sql dba
Hi Everyone, How to get fist and last record from a table in oracle? Thanks in advance
Explain what is rdbms?
What are the different types of triggers?
What is a cursor for loop ?
State some properties of relational databases?
mail-id table contains two columns(email_id,userid) it contains different types of mail-ids,and no of users. here username length is differ na,(ex- tamil@yahoo.com,joshua@hotmail.com like) now i want to fetch the email-ids only starting from '@' (ex-@gmail.com,@yahoo.com,@hotmail.com
What is the unique index?
Does asenumerable execute the query?
Can we connect to postgresql using sql developer?
Inline the values in PL/SQL, what does it mean.?