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

  • Home
  • SEARCH
  • 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 6197165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:46:18+00:00 2026-05-24T03:46:18+00:00

Is it possible to example use: String sql = DELETE field FROM table1, table2

  • 0

Is it possible to example use:

String sql = "DELETE field FROM table1, table2 WHERE field='x', field='y'";

To delete multiple fields from multiple tables? I ask because I am using creating a clean up method that will go through and delete all references to an object in all of my database tables when I delete that object and it seems easier to add everything into one sql statement as opposed to building a separate sql for each table and then executing each one individually. If one statement isn’t possible is there another solutions? Such as building an sql array perhaps and then executing all with one command?

  • 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-24T03:46:20+00:00Added an answer on May 24, 2026 at 3:46 am

    You can’t do that. You need to do multiple delete statements, one per table.

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

Sidebar

Related Questions

Is it possible to use multiple header types in one document? For example: header(Content-type:
Is it possible to use libxml with unicode? For example the xmlParseDoc function takes
Is it possible to use a regex to match February 2009, for example?
Is it possible to typedef long types that use templates? For example: template <typename
I want to use two meta:resourcekey in single control is it possible? for example
Is it possible to capture print output from a T-SQL stored procedure in .NET?
Possible Duplicates: Htmlentities vs addslashes vs mysqli_real_escape_string When to use which string escaping method?
I am trying to use a prepared statement that deletes from two (temporary) tables:
I saw this example somewhere: rs = connection.prepareStatement(select * from table).executeQuery(); Could I use
For example, given the following code, how is it possible to make the string

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.