do i really have to SELECT count(*) just to get number of rows for a table

@wowaname
You should be able to do SELECT count(*), whatever, whatever2 FROM etc

@applejack sqlite3 returns one row, clamping it to the return rows of count()
Follow

@wowaname Right, I was actually doing it on two queries, and now I remember being annoyed over that too.

· · Web · 1 · 0 · 1
@applejack i could manually reallocate memory as the row count grows but thats just as annoying as running two sql queries
@applejack i could also just "guess" based on maximum id value, but depending on the number of deleted rows, that might overallocate by a lot
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.