Windows下PostgreSQL命令行执行SQL查询语句



C:\Program Files (x86)\PostgreSQL\9.5\bin>psql -d wf -U postgres -c "select * from public.wfeCasCard"
错误:  关系 "public.wfecascard" 不存在
第1行select * from public.wfeCasCard
                   ^

C:\Program Files (x86)\PostgreSQL\9.5\bin>psql -d wf -U postgres -c "select * from public."wfeCasCard""
错误:  关系 "public.wfecascard" 不存在
第1行select * from public.wfeCasCard
                   ^

C:\Program Files (x86)\PostgreSQL\9.5\bin>psql -d wf -U postgres -c "select * from ""wfeCard"""
错误:  关系 "wfeCard" 不存在
第1行select * from "wfeCard"
                   ^

C:\Program Files (x86)\PostgreSQL\9.5\bin>psql -d wf -U postgres -c "select * from public.""wfeCasCard"""
 EnterDate  |    DSN     |      CardID
------------+------------+------------------
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 | ACDE1234
 2015-12-11 |   12345689 | ACDE1234
 2015-12-11 | 1233345689 | ACDE1234
 2015-12-11 | 1233444455 | ACDE1234
 2015-12-11 | 1233444455 | ACDE1234
 2015-12-11 | 1233444455 | ACDE123411a
 2015-12-11 | 1233444455 | ACDE123411a
(13 行记录)


C:\Program Files (x86)\PostgreSQL\9.5\bin>psql -d wf -U postgres -c "select * from ""wfeCasCard"""

 EnterDate  |    DSN     |      CardID
------------+------------+------------------
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 |
 2015-12-11 |   12345689 | ACDE1234
 2015-12-11 |   12345689 | ACDE1234
 2015-12-11 | 1233345689 | ACDE1234
 2015-12-11 | 1233444455 | ACDE1234
 2015-12-11 | 1233444455 | ACDE1234
 2015-12-11 | 1233444455 | ACDE123411a
 2015-12-11 | 1233444455 | ACDE123411a
(13 行记录)


你可能感兴趣的:(Windows下PostgreSQL命令行执行SQL查询语句)