• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with inser into query

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear friends,
I have a table with column titles as: (id, price,quality,deadline,UtilityValue,sellerNumber) which Id is an AUTO_INCREMENT!
now I want to copey this table to another table with the exact same column titles. till here every thing is ok! but I DONT want to copy the id field. what I want is that I copy the data of each row except id which should be filled AUTO_INCREMENTAly.
so I write below code:



and I get this error:


I guess it error is related to the id column which I didn't mentioned in insert into query. Am I right? If yes Do you know how can I correct it?
Thank you sooo much!
SAhar.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which DB are you using? For MySQL check this
You might need to specify the required field of both tables in the query. Haven't tried this recently so can't remember exactly
 
Would you turn that thing down? I'm controlling a mind here! Look ... look at the tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic