Hi!

with nums as (
  select 1 num from rdb$database
    union all
  select 2 num from rdb$database)
select n.num
  from nums n
  where not exists (select 1
                      from temptable t
                      where t.id = n.num)

András

From: [email protected] [mailto:[email protected]]
Sent: Tuesday, November 28, 2017 11:56 AM
To: [email protected]
Subject: [firebird-support] Get the value of Query Not Available In Table



Hi,

I am looking for a solution to get values in query and those not available in 
table data.



CREATE TABLE TEMPTABLE(

    ID SMALLINT);



INSERT INTO TEMPTABLE(ID) VALUES(1);



SELECT * FROM TEMPTABLE

WHERE ID IN (1,2)



in the Above case I want to get the value 2 as output of a query.



Kindly Help.

Thanks In Advance.





__________ Information from ESET Mail Security, version of virus signature 
database 16483 (20171128) __________

The message was checked by ESET Mail Security.
http://www.eset.com




[Non-text portions of this message have been removed]


Reply via email to