On 24 Jul 2002 at 14:06, Shashi Shekhar S wrote:

> hi all,
> 
> I need to create a reference from an integer array to another integer. How 
> do I go about doing that ?
> 
> e.g
> CREATE TABLE a (
>       a_id SERIAL,
>       a_data VARCHAR(20),
>       
>       PRIMARY KEY (a_id)
> );
> 
> CREATE TABLE b (
>       b_id SERIAL,
>       b_data VARCHAR(20),
>       r_num INT[],    -- This is an array containing 'n' number of 'a' elements
> 
>       PRIMARY KEY(b_id),
>       FOREIGN KEY (r_num) REFERENCES a (a_id)
> );

I guess looking into postgres documentation of sql command 'CREATE TYPE' would 
help.. 

Bye
 Shridhar

--
Auction:        A gyp off the old block.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to