mercredi 13 janvier 2016

How to get tableinformation in a database(SQLLite)

I'm new to SQLLITE. I'm using it in Eclipse(Java)just in case this is relevant.

Now my problem is that i have a *.db file and know nothing about its content. I would like to know which way i can get some information about the tables inside. Otherwise it seems to be imposible to read in the database correctly by a SELECT Query. So basically my problem is just this part

      stmt = c.createStatement();
      ResultSet rs = stmt.executeQuery( "SELECT * FROM ???????;" );
      while ( rs.next() ) {
         int id = rs.getInt("id");
         ..

Thanks

Aucun commentaire:

Enregistrer un commentaire