Select datatype of the field in postgres

后端 未结 7 2053

How do I get datatype of specific field from table in postgres ? For example I have the following table, student_details ( stu_id integer, stu_name varcha

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-12 12:03

    Try this request :

    SELECT column_name, data_type FROM information_schema.columns WHERE 
    table_name = 'YOUR_TABLE' AND column_name = 'YOUR_FIELD';
    

提交回复
热议问题