delete from cliente where codicliente=(SELECT v.codicliente from vehiculo as v, cliente as c where c.dni="88888888-L" )
Esta consulta que tiene mal
Gracias
| |||
Creo que es por la iwualacion!!En teoria poniendo esto: codicliente=(SELECT v.codicliente from vehiculo as v, cliente as c where c.dni="88888888-L" ) solo te funcionaria si la subquery solo retornara un campo. Pruebalo asi: delete from cliente where codicliente IN (SELECT v.codicliente from vehiculo as v, cliente as c where c.dni="88888888-L" ) Si no te funciona asi postealo que lo miro mas detenidamente!!Un saludo!;) |
| |||
Es tabla clientes relacionada con vehiculos y a la vez con factura-reparacion ("delete from cliente where codicliente in (SELECT v.codicliente FROM vehiculo as v, cliente as c where dni=" 88888888-L") and v.codivehiculo in (SELECT codivehiculo FROM factura-reparacion) ") Gracies ajudar |