Le Jeudi 14 Mars 2002 21:52, Pestilence a écrit :
> 1) Is it possible to create an INT PRIMARY KEY column that automagically
> numbers itself? MS-SQL does this using the IDENTITY keyword.
Use serial type.
> 2) The ISNULL function in both Oracle and MS-SQL takes 2 numbers and
> returns the second if the first is null, otherwise it returns the first.
> ISNULL in Postgres seems to be something quite different. Before I go
> writing my own function to do it, is there one already?
See COALESCE and NULLIF at
http://www.postgresql.com/idocs/index.php?functions-conditional.html
> 3) How do I do 'IF this_sql THEN that_sql'? I keep getting:
> parse error at or near "IF"
CASE WHEN condition THEN result
[WHEN ....]
ELSE
Cheers,
Jean-Michel POURE