• Delete multiple duplicated rows

      0 comments

    How we can delete duplicate records of a table where it has no unique or primary keys?

    Mysql
    delete from table where x = ‘aaa’ limit 1;

    Mssql
    set rowcount 1;
    delete from table where x = ‘aaa’;
    set rowcount 0;

  • Self Join

      0 comments

    What is a self join?

    Self join is just like any other join, except that two instances of the same table will be joined in the query.