SELECT l.lemma_id, l.lemma FROM seoa_morphology AS m LEFT JOIN seoa_morphology_lemma AS l ON l.lemma_id = m.lemma_id WHERE m.word = "детинец" AND l.lemma_id > 0
Table 'tndonzil_sinonim.seoa_morphology' doesn't exist