SQLite not Returning all Records from a Table - SQLite-JDB

231 Views Asked by At

I have a very large table (1074 records), and I am trying to access it with the following query:

PreparedStatement queryColumn = conn.prepareStatement("SELECT * FROM PRAGMA_TABLE_INFO('ImportedCSV')");
ResultSet columns = queryColumn.executeQuery();

While this works, it will only return a certain number of these records. I want to get all of them.

How do I do this?

Thanks

1

There are 1 best solutions below

2
Abdul Rafay On

Execute the below query

SELECT * FROM sqlite_master

then fetch all the table detail sequentially

for(String tableName: tableNameList){ PreparedStatement queryColumn = conn.prepareStatement("SELECT * FROM PRAGMA_TABLE_INFO('+tableName+')"); ResultSet columns = queryColumn.executeQuery(); }