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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:44:14+00:00 2026-05-24T02:44:14+00:00

Is it legitimate to use a SELECT and INSERT simultaneously? Suppose we want to

  • 0

Is it legitimate to use a SELECT and INSERT simultaneously? Suppose we want to move old records from one table to another table with the same columns — can I do this in a single statement? I feel like it should be possible with a stored procedure and it would be interesting to see how that could be done (from my perspective it would seem easier to manage this sort of thing in a programmatic context.) I’m actually primarily curious about whether it would legitimate to write a statement with both a SELECT from one table and use that information to INSERT into another, and hopefully an example of what that might look like.

  • 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-24T02:44:15+00:00Added an answer on May 24, 2026 at 2:44 am

    Yes.

    INSERT INTO TargetTable (<column names>) 
    SELECT <column names> FROM SourceTable
    WHERE blah blah blah...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A quote from Effective Java states that: A second legitimate use of finalizers concerns
Is there a legitimate 'generic' package name I can use to open-source some demo
i need help modelling a use case diagram from a topic, it will be
I have legitimate reasons to do what I am trying to explain. I have
Have you ever obfuscated your code before? Are there ever legitimate reasons to do
What legitimate uses are there for bytecode manipulation and how people implement those bytecode
I'll use the following (trivial) interface as an example: struct IObject { virtual ~IObject()
MSDN states that gacutil.exe is not safe to use for production servers . Is
AFAIK django creates indexes for you in the database (I use MySQL). As these
My question is about whether what follows is an appropriate use of the dynamic

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.