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 3312936
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:03:21+00:00 2026-05-17T22:03:21+00:00

Is it possible to output values from a cascaded delete in SQL? Something like:

  • 0

Is it possible to output values from a cascaded delete in SQL?

Something like:

DELETE [Families]
    OUTPUT [deleted].[FamilyID] [deleted].[FamilyName], [Members].[MemberName]
    FROM [Families]
    LEFT JOIN [Members]
        ON [Members].[FamilyID] = [Families].[FamilyID]

If there were two families with three total members, it should yield something like:

[FamilyID]   [FamilyName]   [MemberName]
 12           'Family A'     'Member 1'
 12           'Family A'     'Member 2'
 13           'Family B'     'Member 3'

It is also acceptable for a solution to yield 1 row per family with the cascade-deleted members in a delimited list. Something like:

[FamilyID]   [FamilyName]   [MemberNames]
 12           'Family A'     'Member 1|Member 2'
 13           'Family B'     'Member 3'
  • 1 1 Answer
  • 0 Views
  • 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-17T22:03:22+00:00Added an answer on May 17, 2026 at 10:03 pm

    The best solution I could find yields two result sets:

    1. Select the IDs of the families to delete into a table variable.
    2. Delete/output family members inner-joined against the table variable.
    3. Delete/output families inner-joined against the table variable.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to output values to the console from within a class library?
Would it be possible to construct SQL to concatenate column values from multiple rows?
Is it possible to capture Python interpreter's output from a Python script? Is it
I'd like to know if it is possible to redirect StreamWriter output to a
Is it possible in PHP to extract values from an array with a particular
Is it possible to redirect all of the output of a Bourne shell script
Is it possible using StAX (specifically woodstox) to format the output xml with newlines
Is it possible for a stand alone executable to generate a report and output
I was just wondering if it is possible to capture the output of a
I’m using Linq to extract values from some XML. Shown below is a simplified

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.