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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:20:26+00:00 2026-06-13T05:20:26+00:00

I have a java program that I made that will create a 5 digit

  • 0

I have a java program that I made that will create a 5 digit string and add it to a mysql database. The strings that are generated will be every combination of the numbers 1-9 the letters a-z and A-Z like

00000
…
00009
0000a
…
0000z
0000A
…
0000Z
00010
…
00019

and so on

My problem is when adding these values to the database it will not add 0000A because 0000a is already in there

for example if I

INSERT INTO `mytable`(`mycolumn`) VALUES ("00000");

INSERT INTO `mytable`(`mycolumn`) VALUES ("0000a");

INSERT INTO `mytable`(`mycolumn`) VALUES ("0000A");

the only values that appear in my database are 00000 and 0000a

Is there anyway to have mysql make this distinction between the two so I can have strings that appear unique

  • 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-13T05:20:27+00:00Added an answer on June 13, 2026 at 5:20 am

    MySql strings are case sensitive by default.

    You could use a case sensitive collation like utf8_bin in the MYCOLUMN field:

    CREATE TABLE MYTABLE (
        ID BIGINT AUTO_INCREMENT, 
        // other fields...
    
        MYCOLUMN VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL UNIQUE, 
        PRIMARY KEY(ID)
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a report creator program made in Java that needs to run every
I have a java program that will work with a variety of Java Beans.
I have a Java program that executes from Spring Qquartz every 20 seconds. Sometimes
Basically, i have done my program so that it will display differences in strings
I'm learning java and I have made simple program that simply reads value from
I made an ATM program. I have a try catch that will ask for
I have made a program in Java that calculates powers of two, but it
I have a java program that performs 5 different tasks. When I run the
I have a java program that is running in the background(Windows). I would like
I have a Java program that runs many small simulations. It runs a genetic

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.