Re: [SQL] primary keys

2002-11-07 Thread Rachel.Vaudron
Hi,

For example you can do something like that:

CREATE TABLE "try" (
"field1"TEXT NOT NULL,
"field2"INT4 NOT NULL,
"field3"TEXT, PRIMARY KEY (field1, field2));

**
   [EMAIL PROTECTED]
Laboratoire de prehistoire du Lazaret
 33 bis bd Franck Pilatte 06300 Nice
tel:04-92-00-17-37/fax:04-92-00-17-39
 Windows a bug's life 

On Wed, 6 Nov 2002, Huub wrote:

> Hi,
>
> I want to create a table which has 2 columns, and both columns have to
> be primary key (or: together they are the primary key). How can I do
> this using SQL? Using pgAdminII for Postgres7.2.2 on RH8.
>
> Thanks
>
> Huub
>
>
> ---(end of broadcast)---
> TIP 4: Don't 'kill -9' the postmaster
>


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[SQL] Alter table

2002-11-07 Thread Rachel.Vaudron
Hi,

I wonder if it is possible to remove a field of a table ?
I haven't found anything about this into the reference manual.
Can I do something like that ?:

ALTER TABLE table
DROP COLUMN column;

Thanks
Rachel
**
   [EMAIL PROTECTED]
Laboratoire de prehistoire du Lazaret
 33 bis bd Franck Pilatte 06300 Nice
http://rachel.familinux.org
 Windows a bug's life 



---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Re: [SQL] Alter table

2002-11-08 Thread Rachel.Vaudron
Thanks a lot, but it's already what i am doing!
It's very a pity that there is no way do to this more quickly!!!

> alter table xxx rename to temp;
> create table xxx as
>   select field1, field2, ...without some field... from temp;
> drop table temp;
>
> Tomasz Myrta
>
>
Rachel


---(end of broadcast)---
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



[SQL] EXIST / NOT EXIST

2002-12-03 Thread Rachel.Vaudron
Hi,

I would like to know if the keyword EXIST can be used with PostgreSQL ?
I have search in the Reference Manuel et tried a query using EXIST in
pgsql, but no result...

Thanks a lot

Rachel

**
   [EMAIL PROTECTED]
Laboratoire de prehistoire du Lazaret
 33 bis bd Franck Pilatte 06300 Nice
tel:04-92-00-17-37/fax:04-92-00-17-39
 Windows a bug's life 



---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [SQL] EXIST / NOT EXIST

2002-12-03 Thread Rachel.Vaudron
> it is EXISTS

I'm a very little shamefull !!!
But Thanks at all.

Rachel


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



Re: [SQL] EXIST / NOT EXIST

2002-12-03 Thread Rachel.Vaudron

> EXISTS is supported (ie. trailing 'S').
I'm a little shamefull ;)

Thanks a lot.

Rachel


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]