Skip to content
Advertisement

How to check for column attributes in postgreSQL?

I am new to SQL. Let say that when someone created a table like this in database named test1 of PostgreSQL:

I make a query to the database and do not know how data in columns are stored. Is there a query to return the stored definition of the columns in the users table or a method to check this ?

For example: The result should return something like:

Advertisement

Answer

You can use information_schema for this

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement