Search
 
SCRIPT & CODE EXAMPLE
 

SQL

query to remove duplicate records in postgresql server


        
            
        
     DELETE FROM
    basket a
        USING basket b
WHERE
    a.id < b.id
    AND a.fruit = b.fruit;
Comment

postgresql remove duplicate rows 2 columns

DELETE FROM sf_table
WHERE id IN
    (SELECT id
    FROM 
        (SELECT id,
         ROW_NUMBER() OVER( PARTITION BY tosp, icd
        ORDER BY  id ) AS row_num
        FROM sf_table ) t
        WHERE t.row_num > 1 );
Comment

PREVIOUS NEXT
Code Example
Sql :: postgres parent and child tables 
Sql :: sql query inner join 3 tables 
Sql :: mssql procedure 
Sql :: move files from one folder to another in sql server 
Sql :: homebrew install mysql 
Sql :: sql tabelle erstellen 
Sql :: mysql dump for selected row 
Sql :: SQL Modify Column in a Table -SQL Server 
Sql :: sql datum formatieren 
Sql :: set mysql password 
Sql :: postgresql delete all content 
Sql :: connect to mysql c# connection string C# 
Sql :: psql check if value in array 
Sql :: mysql where in maintain order group_concat 
Sql :: how to check user grant in mysql 
Sql :: mysql two joins 
Sql :: Create the connection pool mysql2 
Sql :: psql shell 
Sql :: change password in mysql 
Sql :: sqlalchemy get ids 
Sql :: date less than in sql 
Sql :: timestamp sql 
Sql :: postgresql delete cascade 
Sql :: oracle sql developer 
Sql :: SQL/update 
Sql :: mysql default -temp password 
Sql :: sql delete duplicate rows but keep one 
Sql :: windows aggregate functions in postgresql 
Sql :: postgres drop all tables 
Sql :: create atable copy in pgsql 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =