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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:40:15+00:00 2026-06-13T12:40:15+00:00

I have a table i need to add info to for 450 rows, i

  • 0

I have a table i need to add info to for 450 rows, i can identify each row with a unique order number and only need to update 4 of the rows on the table for each order number.

update ordercontacts
set firstname = 'joe', lastname = 'smith', email = 'joesmith@smith.com', contacttypeid = 13
where orderid = 1284480

this just replaced my values so i had to fix that

i tried this as well

insert into ordercontacts
(firstname, lastname, email, contacttypeid)
values
('joe', 'smith', 'jowsmith@smith.com', 13)
where orderid in (1284480)

but the syntax is not correct and im not sure what the correct syntax would be

I had thought something like this would work but it doesnt obviously. Can anyone help me out? Each of the order numbers already has a different contact attached to it, i basically want the end result to be like this:

order     firstname   lastname        email               contacttypeid
1284480   joe        smith      joesmith@smith.com         13
1284480   steve      andrews      steve@steve.com         11

Im looking to add a new contact on top of one that already exists for each order number. The syntax for the update i have is only replacing the info that is already there.

  • 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-13T12:40:16+00:00Added an answer on June 13, 2026 at 12:40 pm
    insert into table_name (order, firstname, lastname, email, contacttypeid) 
    values (1284480, 'joe'...);
    

    You’re wanting to insert values rather than update. Update will overwrite the values of the existing one, essentially it’s “replace x in the row where id = y”. Insert will actually create a new row.

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

Sidebar

Related Questions

Let's say I have a table with 1M rows and I need to add
I have a table with 100 records with no PK. I need to add
I have a table of data that I need to dynamically add a column
I have a table of 3 by 3. I need a way to add
I am trying to add a table in aspx page and need to have
I have a table and I need to count all unique users on it.
How can I delete a specific row from an sql table? I have a
I have three table I need to query table 1,2 and 3 and select
I have table 'products' and I need to update 'price' field by 20% if
I have a table that I need to update where all columns are optionally

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.