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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:49:30+00:00 2026-05-26T23:49:30+00:00

I’m just wondering why CREATE TABLE employeeinfo( position CHAR(50), salary INT NOT NULL, branch

  • 0

I’m just wondering why

CREATE TABLE employeeinfo(
  position CHAR(50),
  salary INT NOT NULL,
  branch CHAR(50)
) ENGINE=InnoDB;

SELECT * FROM EMPLOYEEINFO
WHERE position >= 'Regional Manager';

is returning every person in the table.

Is it because it’s some kind of array? It’s not an alphabetical thing. Could it be because of the values in memory being greater than Regional Manager’s value in memory? I think someone told me it was because of a difference between pointer locations in memory?

  • 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-26T23:49:31+00:00Added an answer on May 26, 2026 at 11:49 pm

    There’s no such thing as an array in relational databases.

    If the statement is returning every entry, it’s because the condition always evaluates to true. This implies that position is always >= the string ‘Regional Manager’, so the task is to determine why this is the case.

    If position has a text type, then the comparison is a string comparison, so something such as ‘S’ would be >= ‘Regional Manager’. String comparisons depend on the encoding (called “character set” in MySQL parlance) and collation used for the column. The collation determines the order for individual characters. Additionally, MySQL uses case insensitive comparisons by default for most collations, so 'a' < 'Regional Manager' but 's' >= 'Regional Manager'.

    If position holds a numeric value, then MySQL will convert ‘Regional Manager’ to a number using as much as the beginning of the string as can be interpreted as a number:

    SELECT CAST( 'Regional Manager' AS SIGNED INT );
    -- result: 0
    SELECT CAST( '23 Skidoo' AS SIGNED INT );
    -- result: 23
    

    If this is the case, then as long as position is positive, it will be >= ‘Regional Manager’.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
For some reason, after submitting a string like this Jack’s Spindle from a text

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.