Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: SQLite: how to get a number of rows from SELECT query

by erix (Prior)
on Jul 29, 2021 at 22:58 UTC ( #11135505=note: print w/replies, xml ) Need Help??


in reply to SQLite: how to get a number of rows from SELECT query

If the SQLite is new enough, you could use a window function:

select * , count(*) over () as rowcount from t ;

(But of course, now you have an extra column which is not always what you want. YMMV, etc)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135505]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2022-01-21 17:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (59 votes). Check out past polls.

    Notices?