Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 610815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:42:57+00:00 2026-05-13T17:42:57+00:00

i am new to this topic. i want something like this. i have two

  • 0

i am new to this topic.
i want something like this.

i have two tables in my sqliteDatabase one is master and another is child.
Now if i delete a record from master suppose i delete a row from master where id=5, then all the records from the child table whose id = 5 deleted automatically.
I don’t know how to create triggers and how to apply foreign key constraints so someone please tell me a way to do this in sqlite3 Manager of firefox.
Thanks

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:42:58+00:00Added an answer on May 13, 2026 at 5:42 pm

    You don’t need a trigger for that, your foreign key will do that if you define ON DELETE CASCADE:

    CREATE TABLE child(
      id         INTEGER,
      some_info  TEXT, 
      master_id  INTEGER,
      FOREIGN KEY(master_id) REFERENCES master(id) ON DELETE CASCADE
    );
    

    See documentation about foreign keys.

    EDIT:

    If you really need to do it using a trigger, have a look at Foreing Key Triggers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im new to this.I have a cron file called xml.php and i want to
I am new to this topic, i want to implement Activity group for buttons
I saw two related questions about this topic - one has an old link
I'm new to this topic so sorry if this is a stupid question :\
Im new to java and im planning on skipping this topic because even if
i am new to RoR and I am a little confused on this topic.
I am new this sharepoint development and i have task in hand to do
I have a test where I want to ensure separate operations within one page
I have read other questions on this topic but none that actually answers my
I want to create a new lambda taking no arguments from lambda taking one.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.