In SQL server, if i write command like this -
EXEC SP_HELP EmployeeMaster
it'll return my table fields and all the default constraint defined on it. Now i just wants to know that is there any kind of command in postgres like above ?
Although i know to get just table fields in postgres, you can use below query.
select column_name from information_schema.columns where table_name = 'EmployeeMaster'
No, there's nothing like that server-side. Most of PostgreSQL's descriptive and utility commands are implemented in the psql
client, meaning they are not available to other client applications.
You will need to query the information_schema
to collect the information you require yourself if you need to do this in a client app.
If you're using PgAdmin-III, well, psql
is a useful and powerful tool, well worth learning.
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