TableQuery statement syntax

I have a method end i can not understand how to create SQL transaction


private void initContainers(){
        	 try {
	        	 TableQuery  q1 = new TableQuery("bill", connectionPool, new MSSQLGenerator());
	        	 q1.setVersionColumn("OPTLOCK");
	        	 q1.setDebug(debugMode);
	        	 personContainer = new SQLContainer(q1);
	        	 personContainer.setDebugMode(debugMode);
        	     }
        	 catch (SQLException e){e.printStackTrace();}
        	 	 
         }

the Table Query create new statement
DB → SELECT * FROM (SELECT row_number() OVER ( ORDER BY “ID” ASC) AS rownum, * FROM bill) AS a WHERE a.rownum BETWEEN 0 AND 1

how to create a corect statement or call a procedure in Table Query method