Re: Package-defined type as column type
Date: Sun, 3 Feb 2008 04:50:44 -0800 (PST)
Oops! I think I missed a warning - object types can't be declared in packages...
"Currently, you cannot define object types in a PL/SQL block, subprogram, or package. You can define them interactively in SQL*Plus using the SQL statement CREATE TYPE."
On Feb 3, 4:41 pm, NiTiN <k.niti..._at_gmail.com> wrote:
> Good day,
> I'm trying to use a package-defined type as the data type for a column
> in an Oracle table and am trying to figure out how to get it to work.
> I'm guessing package-defined types can't be used as column data types.
> Here's a sample:
> CREATE OR REPLACE PACKAGE pkg1_test
> TYPE usersource AS OBJECT (
> sourceinfo VARCHAR2(1024),
> sourcetype CHAR(1)
> END pkg1_test;
> CREATE TABLE test1 (
> id INTEGER,
> val pkg1_test.usersource
Received on Sun Feb 03 2008 - 06:50:44 CST