Valuable SQL lesson

ameoba

Supreme [H]ardness
Joined
Jan 9, 2001
Messages
6,412
Valuable SQL lesson:
Code:
wkprod=> \q
wellkeeper@sand:~> 
wellkeeper@sand:~> select count(*) from wkusers;
-bash: syntax error near unexpected token `('
wellkeeper@sand:~> select count(userid) from wkusers;
-bash: syntax error near unexpected token `('
wellkeeper@sand:~> select userid from wkusers;
-bash: syntax error near unexpected token `from'
wellkeeper@sand:~> SELECT userid FROM wkusers;
-bash: SELECT: command not found
wellkeeper@sand:~> select count(userid) from wkusers;
-bash: syntax error near unexpected token `('
wellkeeper@sand:~> psql
Welcome to psql 7.3.2, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

wkprod=> select count(*) from wkusers;
 count 
-------
    45
(1 row)

Bash is not an effective database interface.
 
heh, yeah. I've typed Perl statements in C++ class by accident. That also doesn't work.

If you hadn't quit psql, it woulda worked okay.
 
Back
Top