SELECT
column_name,
data_type
FROM
information_schema.columns
WHERE
table_name="table_name";
with the above query you can columns and its datatype
More Related Contents:
- How do I (or can I) SELECT DISTINCT on multiple columns?
- How to speed up insertion performance in PostgreSQL
- PostgreSQL GROUP BY different from MySQL?
- How can I import a JSON file into PostgreSQL?
- Return multiple columns of the same row as JSON array of objects
- ERROR: there is no unique constraint matching given keys for referenced table “bar”
- Normalize array subscripts so they start with 1
- Is there a way to define a named constant in a PostgreSQL query?
- Getting all Buildings in range of 5 miles from specified coordinates
- Call a set-returning function with an array argument multiple times
- Fastest check if row exists in PostgreSQL
- PostgreSQL ORDER BY issue – natural sort
- Why do NULL values come first when ordering DESC in a PostgreSQL query?
- Slow simple update query on PostgreSQL database with 3 million rows
- Discard millisecond part from timestamp
- Return setof record (virtual table) from function
- How do I cast a string to integer and have 0 in case of error in the cast with PostgreSQL?
- SQL column reference “id” is ambiguous
- How to use multiple CTEs in a single SQL query?
- IN Clause with NULL or IS NULL
- How to convert PostgreSQL 9.4’s jsonb type to float
- postgres – where in (list) – column does not exist
- incomplete information from query on pg_views [duplicate]
- PostgreSQL: Give all permissions to a user on a PostgreSQL database
- Rails 4 LIKE query – ActiveRecord adds quotes
- pseudo_encrypt() function in plpgsql that takes bigint
- How to group timestamps into islands (based on arbitrary gap)?
- Run a query with a LIMIT/OFFSET and also get the total number of rows
- How to create a new database with the hstore extension already installed?
- Padding zeros to the left in postgreSQL