[DB-SIG] Portable method of determining which column wasn't unique?

Eugene V. Dvurechenski jno@glasnet.ru
2002年10月14日 11:24:51 +0400


On Thu, Oct 10, 2002 at 01:48:24PM -0600, Bob Gailer wrote:
> You could :
> select * from table where unique-column1 = proposed-new-value1
> select * from table where unique-column2 = proposed-new-value2

 select count(*) from table where unique-column1 = proposed-new-value1
 select count(*) from table where unique-column2 = proposed-new-value2
would be a bit more "portable" (or just handy).
it will return always integer non-null value.
-- 
SY,
jno (PRIVATE PERSON) [ http://www.glasnet.ru/~jno ]
a TeleRoss techie [ http://www.aviation.ru/ ]
If God meant man to fly, He'd have given him more money.

AltStyle によって変換されたページ (->オリジナル) /