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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:47:51+00:00 2026-05-16T14:47:51+00:00

I have an INSERT INTO … ON DUPLICATE KEY UPDATE … statement that executes

  • 0

I have an INSERT INTO ... ON DUPLICATE KEY UPDATE ... statement that executes fine (but with warnings) in the mysql> prompt:

mysql> INSERT INTO ... ON DUPLICATE KEY UPDATE ... ;
Query OK, 2 rows affected, 2 warnings (0.00 sec)
Warning (Code 1364): Field 'x' doesn't have a default value

However, when I try to execute the same statement via JDBC the warning shows up as an SQLException and no rows are updated:

java.sql.SQLException: Field 'x' doesn't have a default value
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3536)
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3468)  
  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1957)
  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2107)
  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
  at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2086)
  at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1365)

Is there a JDBC or mysql connector setting or command to ignore or suppress these warnings?

I’m using MySQL Community Server 5.1.31 with MySQL connector 5.1.8 and Java 1.5.0_24.

  • 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-16T14:47:52+00:00Added an answer on May 16, 2026 at 2:47 pm

    You can use INSERT IGNORE to suppress these completely.

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

Sidebar

Ask A Question

Stats

  • Questions 530k
  • Answers 530k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I have used boost::thread in performance-sensitive production code and it's… May 16, 2026 at 11:37 pm
  • Editorial Team
    Editorial Team added an answer I don't know about D profilers, but in general there… May 16, 2026 at 11:37 pm
  • Editorial Team
    Editorial Team added an answer The cake way would be to put the public access… May 16, 2026 at 11:37 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have an insert statement that pulls some data into a few table variables
I have one mysql table 'alfa' that will contain the primary key of another
I have an insert statement: insert into parentTbl select firstId, secondId, thirdId, dateTm from
I have an insert sql statement, e.g. INSERT INTO `table_a` (`col_a`, `col_b`, `col_c`, `col_d`)
I have an insert query that gets generated like this INSERT INTO InvoiceDetail (LegacyId,InvoiceId,DetailTypeId,Fee,FeeTax,Investigatorid,SalespersonId,CreateDate,CreatedById,IsChargeBack,Expense,RepoAgentId,PayeeName,ExpensePaymentId,AdjustDetailId)
Good Morning, Say I have an insert statement: Insert INTO tblTest (fieldOne,FieldTwo,fieldThree) VALUES ('valueOne','valueTwo','null')
Hey guys quick question, I currently have an insert statement $query= INSERT into new_mail
I have a query that looks like this: Insert Into tblX (a,b,c) Select x
I have some PHP code that inserts a date into a table: INSERT INTO
I have simple insert into.. query which is taking around 40 seconds to execute.

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.