0
As is the syntax of a query using Inner Join delete in sql, to compare two table code and exclude being equal?
Table itemVenda. in table itemvenda a sale was registered whose code is 4. To execute the chargeback, if applicable, the user can remove.
Table controleCaixa. When reversing, the itemvenda table record will be removed and at the same time removed, the record whose codDoc = 4. This document code is generated when the sale is completed.
use a sub-select
– Rovann Linhalis
post the structure of your tables and the query you need to help you
– Rovann Linhalis
Follow the table structure. I need a query using Inner Join delete in sql, to compare two table code and exclude be equal.
– Josue Santos
@Joshua: Is the database manager Mysql or SQL Server? Both tags are set. // Is it only one sale item or all sale? // In addition to the tables
itemVenda
andcontroleCaixa
, there is the tablevenda
?– José Diz
Jose, there’s the sale table too. In this case I managed to solve by blocking an item of sale and delete, the register of the control of the box leaving, only the record in the sale table. I resolved with Rovann’s help below. Thank you!
– Josue Santos