mercredi 27 juillet 2016

How to fetch a dummy record if a sub-query count is zero?

I need to fetch one dummy record from tableA when the count of records in tableA is zero. If the table count is more than zero,then there should not be the dummy value X fetched. It is something like: Select 'X' As Count from tableA When (Select count (*) From tableA) >0

Aucun commentaire:

Enregistrer un commentaire