Hello, I have already searched here, but I did not find an answer.
How can I build a sql via DSL or Dao that looks like this:
select count(ID) from employer
The ID column is primary key, so uniq and has no nulls.
Employer.slice(Employer.Id).count()
produces
select count(*) from employer
Thanks!
t
tapac
04/19/2021, 4:56 PM
Employer.slice(Employer.Id).selectAll()
m
Miroslav Sobotka
04/19/2021, 5:53 PM
Thank you @tapac! Now I see I made a mistake in the question - I forgot the count(). I want to know how many rows has the table and want to use only the column that have the primary key (not over all with the star). Is there a way to make it?