|
-
Think of this as a user defined datatype. You can't do a:
SELECT * FROM VARCHAR2
so why would you expect to do this from your datatype. You must first create an instance of the object and store it in a table. At this point you can select it using the "." notation. Try this:
CREATE OR REPLACE TYPE concerned AS OBJECT(
msisdn VARCHAR2(10),
profile NUMBER(5));
/
CREATE TABLE concerned_tab (
id NUMBER(10),
concerned_col concerned);
INSERT INTO concerned_tab (id, concerned_col)
VALUES (1, concerned('TEST',5));
COMMIT;
SELECT a.concerned_col.msisdn,
a.concerned_col.profile
FROM concerned_tab a;
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|