Command line for PostgreSQL in Ubuntu

November 27, 2010 at 1:49 pm Leave a comment

1.Start data base

sudo /etc/init.d/postgresql-8.4 start

2. Login to your database in this case my data base name is Research0_development and username is chada

psql -d Research0_development -U chada

3. command for examine the database

  • \l :List databases
  • \c database-name :List databases
  • \d :List tables in database
  • \d table-name :D escribe table
  • \q : quit
  • select * from table-name :List table contents
  • delete from table where condition =>

delete from place_ratings where user_id = 49;

 

 

Advertisement

Entry filed under: Uncategorized. Tags: .

Installation Wekaclassalgos1.7 in Ubuntu Installing Apache, PHP, MySQL and phpMyAdmin on Ubuntu 9.04

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

November 2010
M T W T F S S
« Jun   May »
1234567
891011121314
15161718192021
22232425262728
2930  

Most Recent Posts


Follow

Get every new post delivered to your Inbox.