I have learned USING by doing things like this:
SELECT nufactura,des,cantidadc,precio,precio*cantidadc AS "SUBTOTAL"
FROM `facturas` INNER JOIN `fac_pro` USING(nufactura)INNER JOIN `productos` USING(codigop)
WHERE nufactura = "700"
ORDER BY cantidadc DESC
but I haven't really understood its order very well or why it is like that, much less the use with ON and WHERE and that call with nombre.nombre1.
That point I don't really know what it does. Is it the same as FROM ? Is it like a pointer or something?
When you concatenate 2 tables you need to indicate which fields are the ones that relate the tables.
Normally ON is used by default:
In some cases the names of the tables are the same, for this a shortcut is to use USING Suppose that T1 has a field called id_foo the same as T2 that also has a field called id_foo that relates them.
You can use the ON normally:
Or just use the USING: