(SELECT
idRecord
FROM records WHERE idRecord = 80)
UNION
(SELECT
idCategory,nameCategory
FROM categories WHERE idCategory=7)
SELECT records.idRecord, categories.idCategory, categories.nameCategory FROM categories INNER JOIN records ON records.idRecord = 80 and categories.idCategory = 7