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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:46:12+00:00 2026-06-18T06:46:12+00:00

If I enter two Strings with only white space. I will Get this error

  • 0

If I enter two Strings with only white space. I will Get this error message:

ERROR 1062: Duplicate entry ‘ ‘ for key ‘PRIMARY’

How can I Turn off “Auto-Trim” ?

I’m Using this Charset: uft8-uft8_bin and This Datatype: Varchar.

  • 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-18T06:46:13+00:00Added an answer on June 18, 2026 at 6:46 am

    According to the SQL 92 documentation, when two strings are compared they are first made equal in length by padding the shortest string with spaces.

    Search for 8.2 <comparison predicate> in the document.

    If the length in characters of X is not equal to the length
    in characters of Y, then the shorter string is effectively
    replaced, for the purposes of comparison, with a copy of
    itself that has been extended to the length of the longer
    string by concatenation on the right of one or more pad char-
    acters, where the pad character is chosen based on CS. If
    CS has the NO PAD attribute, then the pad character is an
    implementation-dependent character different from any char-
    acter in the character set of X and Y that collates less
    than any string under CS. Otherwise, the pad character is a
    <space>.
    

    So in other words. Its not about storing the value with the amount of spaces you entered, but its the comparisment it does to check for duplicate primary key. So you cannot have two strings with a different amount of spaces act as a primary key

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

Sidebar

Related Questions

I have two tabitems. User will enter some data and save it on the
So two questions here: If I use <input type=button onclick=validate()> then the enter key
how to restrict user to enter only numbers with 6 digits and two decimal
I wanted to allow only characters in a textbox and space in between two
I have a main report that prompts the user to enter two parameters (@ORI
![enter image description here][1]On my two demo and screenshot, you can understand that so
I want to have two input with one button for user to enter their
i have two dropdown list. first drop down:1 enter code here <form:select path=custName id=custName>
i want to draw line, i have two textfiled in which i enter some
In the admin, if you enter in a slug two things are applied through

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.