PDA

View Full Version : sql


caustin0
05-03-02, 18:05
Is it possible to combine an if statement with sql...example:

if x=y then
SELECT *
FROM tbl_comp
else
SELECT *
FROM tbl_comp
Where x<>y

Manish
05-08-02, 15:33
This should work in standard SQL implementations...including PL/SQL and MS SQL Server.