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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:43:13+00:00 2026-06-03T22:43:13+00:00

I have 2 tables: publications and books. Currently, the table publications is empty. I

  • 0

I have 2 tables: publications and books.

Currently, the table publications is empty.

I need to select all the books in the ‘books’ table with volume “26” and insert it in the publications table. I should also populate the column publications.component with ‘thesorus’

I tried the sql below but it does not seem correct:

INSERT INTO publications (book_fk, component) VALUES (SELECT book_id FROM books WHERE volume = 26, "thesorus");

Any suggestion is most appreciated

  • 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-06-03T22:43:16+00:00Added an answer on June 3, 2026 at 10:43 pm

    The correct syntax is:

    INSERT INTO publications (book_fk, component) SELECT book_id, 'thesorus' FROM books WHERE volume = 26
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table Customers with a CustomerId field, and a table of Publications
I have tables linked by FK, I query on the first table using entity
We currently have merge replication set up to merge certain tables between two databases.
Hi i have a columm in the table and i want to select the
i have tables driver, cars and trailers they are all in relationship. and main
In my database I have tables that define types for example Table: Publication Types
Here's my simple SQL question... I have two tables: Books ------------------------------------------------------- | book_id |
I have tables in a MySQL database like this... CREATE TABLE `someUserTable` ( userId
I have tables as below. Table Messages message_id parent_id forum_id user_id Table Users user_id
I have tables A and B with identity PKs ida and idb : ex

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.