Here are two statements that I\'d like to work, but which return error messages:
IF EXISTS (SELECT * FROM gdata_calendars WHERE `group` = ? AND id = ?) SELE
if exists(select * from db1.table1 where sno=1 ) begin select * from db1.table1 where sno=1 end else if (select * from db2.table1 where sno=1 ) begin select * from db2.table1 where sno=1 end else begin print 'the record does not exits' end