Hi there, I know how to take mysql prompt by using mysql -u <username> -p
Similarly how can create get prompt to postgresql. I need to create database and tables.
Please help me . I am newbie to postgresql.
Riaz Thad
pgsql -U <name> <database> or from command createdb <database>
man psql will be your friend 🙂
Or the Postgres manual in general (as he didn't know the name of the commandline tool)
Yes, take a look here:
http://www.postgresql.org/idocs/
Thanks Mr. Allen ,melmoth,vincent,Scott Marlowe. I got it and I could create my first database and tables.
But,Do you know how to list all the tables. mysql(show tables) oracle(select * from tab) postgresql( ? )
Thanks in Advance
For postgresql, it's:
select tablename from pg_tables;
OR, from the command line / shell:
psql -l dbname
Hi friends,
Thanks a lot !!!