SELECT COALESCE(IDZakaz, '') FROM ... SELECT * FROM rozpocty_rozpocty WHERE COALESCE(IDzakaz, '') = ''
Nepoužívat konrstrukce subselectů "not in (select …)", ale predikát EXISTS.
SELECT * FROM sklad_vc vc WHERE NOT EXISTS (SELECT * FROM sklad_prijemky prijemky WHERE prijemky.idprijemka=vc.idprijemka)
SELECT CASE WHEN (FIELD = 1) THEN 'x' WHEN (FIELD = 2) THEN 'y' ELSE 'z' END FROM ...
SELECT SUBSTRING(FIELD FROM 1 FOR 5) FROM ...