Jun
19
2010
PostgreSQL: PSQL Select Distinct Output * To Generate New Table
Posted by alex in InsightsEarlier this evening I ran into a unique issue where a PostgreSQL table had been created with no primary key this allowing duplicate rows to exist in the database table. You are unable to delete such rows in a SQL table because there is no primary key. After not being able to delete the rows via the PSQL CLI I opened pgAdmin III to see if I could delete the rows using the GUI interface provided by pgAdmin III however the delete was grey in the menu as shown in the below image.
Tags: alter table, count(*), create table, database, delete, distinct, pgAdmin, postgres, PostgreSQL, primary key, psql, rename, select, select distinct, sql, syntax, table








Entries (RSS)