Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Postgres: How to view contents of a table? [duplicate]

Tags:

postgresql

Here is what I have?

contacts=# \l
                                 List of databases
   Name    |  Owner   | Encoding |  Collate   |   Ctype    |   Access privileges
-----------+----------+----------+------------+------------+-----------------------
 contacts  | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 postgres  | postgres | UTF8     | en_US.utf8 | en_US.utf8 |
 template0 | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
           |          |          |            |            | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.utf8 | en_US.utf8 | =c/postgres          +
           |          |          |            |            | postgres=CTc/postgres
(4 rows)

contacts=# \d
             List of relations
 Schema |     Name      | Type  |  Owner
--------+---------------+-------+----------
 public | SequelizeMeta | table | postgres
(1 row)

contacts=# select * from SequelizeMeta;
ERROR:  relation "sequelizemeta" does not exist
LINE 1: select * from SequelizeMeta;
                      ^
contacts=# contacts=# select * from public.SequelizeMeta;
ERROR:  relation "public.sequelizemeta" does not exist
LINE 1: select * from public.SequelizeMeta;
                      ^

How do I read the contents of SequelizeMeta?

Thanks

like image 758
daydreamer Avatar asked Sep 24 '17 17:09

daydreamer


People also ask

How do I find duplicate records in the same table?

One way to find duplicate records from the table is the GROUP BY statement. The GROUP BY statement in SQL is used to arrange identical data into groups with the help of some functions. i.e if a particular column has the same values in different rows then it will arrange these rows in a group.

How do I view the contents of a table?

click on the table, then either: right-click and select Display. click on the Table > Display Table menu option. hit F9.

How can we find duplicate values in multiple tables?

Check for Duplicates in Multiple Tables With INNER JOINUse the INNER JOIN function to find duplicates that exist in multiple tables. Sample syntax for an INNER JOIN function looks like this: SELECT column_name FROM table1 INNER JOIN table2 ON table1. column_name = table2.


1 Answers

Based on wildplasser command, this is what I had to do. Thank you wildplasser

contacts=# select * from "SequelizeMeta";
 name
------
(0 rows)
like image 71
daydreamer Avatar answered Oct 13 '22 17:10

daydreamer