[HHH-9523] select from dual replaced with select from existing table

https://hibernate.atlassian.net/browse/HHH-9523