Open Side Menu Go to the Top

01-03-2008 , 07:18 PM
I am inside a PostgreSQL database through the command line interface. Now I want to run a query. Retrieve some info!

I have tried:
Code:
DATABASENAME=# SELECT columnname FROM tablename

But that does nothing. It seems like I need to press a play button or something. What more do I need to write to get it working?

Another similar thing I need help with is creating a user with restricted rights (preferably no writing rights).

I have tried:
Code:
DATABASENAME=# CREATE USER username

but that does nothing!


What is missing? What do I need to write for things to happen?
PostgreSQL command line help! How to run a SQL query? Quote
PostgreSQL command line help! How to run a SQL query?
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
PostgreSQL command line help! How to run a SQL query?
01-03-2008 , 08:40 PM
I guess you need to finish each line with a semi-colon, unless you are doing so but just failed to list it with your examples.

Like this:

DATABASENAME=# SELECT columnname FROM tablename;
PostgreSQL command line help! How to run a SQL query? Quote
01-04-2008 , 09:44 AM
Thanks dave. That did the trick!
PostgreSQL command line help! How to run a SQL query? Quote
01-04-2008 , 11:17 AM
I have another small question I hope I can get help with. Sometimes the command prompt shows:

HOLDEMMANAGER2=#

Sometimes it shows:

HOLDEMMANAGER2(#

What does that mean?
PostgreSQL command line help! How to run a SQL query? Quote
PostgreSQL command line help! How to run a SQL query?
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
PostgreSQL command line help! How to run a SQL query?

      
m