Click here to Skip to main content
15,886,060 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i know how to select all database from my sql it is "SELECT SCHEMA_NAME AS `Database` FROM INFORMATION_SCHEMA.SCHEMATA"


please give sql query for select all databases from pstgres in C# language windows form
Posted

1 solution

Try:
SQL
SELECT datname FROM pg_database WHERE datistemplate = false;

Not my code, it came from http://dba.stackexchange.com/questions/1285/how-do-i-list-all-databases-and-tables-with-psql-command-line-tool[^] and took me about 30 seconds to find with google.

Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

In future, please try to do at least basic research yourself, and not waste your time or ours.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900