KH Lim,
In the future, this sort of question is more appropriate for the PGSQL-NOVICElist.
> What is the correct operator for not equal to in select statement? I'm a
> bit confuse.
>
> Situation
>
> Let say I want to select stock_key from stock_lot with the condition
> stock_lot's lot_no is not equal to stocks' lot_no. What select statement
> should I use?
SQL92 Standard Syntax (works on PostgreSQL):
WHERE stock_lot.lot_no <> stocks.lot_no
Not SQL92 Standard, but also works on PostgreSQL:
WHERE stock_lot.lot_no != stocks.lot_no
You should also pick up an introduction to PostgreSQL and to SQL in general. See
http://techdocs.postgresql.org/bookreviews.phpfor several booksuggestions. In English, "Database Queries for Mere
Mortals"is a good onefor novices.
If you need a book in another language, e-mail me back and I'll try to locate abook that has been translated into your
preferredtongue.
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete
informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small
businesses fax 621-2533 and non-profit organizations. San Francisco