I have written java code to connect to H2 database(sonar's default database) and using metadata I can see all tables and columns for each table. But I want to see table structure(like Primary key, foreign key, number of records in table). How can I view table structure using metadata? or Is there any other approach for viewing table structure?
Solution/help would be highly appreciated.
show columns from table_name;
This will show you the data type of columns, primary key, initial values etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With