Get Doctype Details from the Doctype using the Postgres SQL

Hi All,

I have created the site using the Postgresql.
I am trying to get the Doctype detail using the system console on frappe or terminal. please let me know steps need to perform on querying to get the doctype details

earlier I use “SELECT * FROM `tab” on MariaDB to get the info but same script it is not working.

Thanks

Please use double quotation marks "tab Item" to identify your table.

1 Like

Hey @maslamhmt , thanks for the answer - it was useful. Could you please share why we need to use double quotes? Or in other words, why select * from tabArticle does not work but select * from "tabArticle" works?

It is some sort of difference between PostgreSQL server and MariaDB server. When you move on, difference kind of relational databases, there will be a short difference between the syntax of the SQL language. For example, in MariaDB & MySQL, we use SELECT LAST_INSERT_ID() for getting the latest generated record ID. On the other hand, in Microsoft SQL Server, we use SELECT @@IDENTITY as 'identity' to get the same response from the server.

1 Like