How to run 2 SQL "SELECT"s atomically? Or any other better way to get number of rows before i process them How to run 2 SQL "SELECT"s atomically? Or any other better way to get number of rows before i process them database database

How to run 2 SQL "SELECT"s atomically? Or any other better way to get number of rows before i process them


how about

SELECT (SELECT COUNT(*) FROM table) c, * FROM table