Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

83
Vistas
Delete data from 4 different tables

I've got 4 different tables and I want to delete one row, but it says: id is still referenced from table "parts". How to delete from table Car specific car (for example with id=10) and delete all data without dropping all tables and data? I created tables with Delete Restrict.

Table Car:
variables

Table Repair:
variables,
car_id integer NOT NULL REFERENCES car(id) ON UPDATE CASCADE ON DELETE RESTRICT 

Table Parts:
variables,
repair_id integer NOT NULL REFERENCES repair(id) ON UPDATE CASCADE ON DELETE RESTRICT 

Table Shop:
variables, part_id integer NOT NULL REFERENCES part(id) ON UPDATE CASCADE ON DELETE RESTRICT 
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

you set yourself ON DELETE RESTRICT , so it restricts deletion if still referenced. You have to in transaction drop existing FK add new with REFERENCES car(id) ON UPDATE CASCADE ON DELETE CASCADE then you will be able to delete cascaded...

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda