Hello,

empno | dep_id | sec_id | pos_id
------------------------------------------
38084 | 5 | 3 | 1
38084 | 5 | 3 | 1
38084 | 5 | 3 | 1

Now i want to delete only one record of this, so i found LIMIT does not work with DELETE.
So i tried like this :

Code:
$query="DELETE FROM employees 
        WHERE empno
		     IN 
                    (SELECT empno 
		     FROM employees
		     WHERE empno='$empno'
		     AND dep_id='$dep_id'
		     AND sec_id='$sec_id'
		     AND pos_id='$pos_id'
                     LIMIT 1
		     )	";
ERROR : You can't specify target table 'employees' for update in FROM clause