Mysql inner join delete query
MySQL DELETE Query. If you want to delete a record from any MySQL table,
then you can use DELETE command.
syntax:
SQL syntax of DELETE command to delete data from a MySQL table:
* You can specify any condition using WHERE clause.
* You can delete records in a single table at a time.
Examples :
Not in delete query
MySQL DELETE Query. If you want to delete a record from any MySQL table,
then you can use DELETE command.
syntax:
SQL syntax of DELETE command to delete data from a MySQL table:
* You can specify any condition using WHERE clause.
* You can delete records in a single table at a time.
DELETE T1, T2
FROM T1
INNER JOIN T2 ON T1.key = T2.key
WHERE condition
Examples :
DELETE t1 FROM table1 t1
INNER JOIN table2 t2 ON t2.id = t1.id
WHERE (t1 = "test");
Not in delete query
delete from transactionhead where code not in (select transactionheadcode from transactiontable)
0 Comments