select * from videolar as v with(nolock) left join kategoriler as k with(nolok) k.id = v.katid select count(id) from videolar as v with(nolock) left join kategoriler as k with(nolok) k.id = v.katid