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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:15:52+00:00 2026-06-05T19:15:52+00:00

Let us suppose I have a table created as follows: create table `test_table` (

  • 0

Let us suppose I have a table created as follows:

create table `test_table` (
  `col1` varchar(128) NOT NULL,
  PRIMARY KEY (`col1`(16))
);

Now, suppose I have a script that is examining the schema, looking for information about primary keys. How can that script find the index prefix length (16 in the above example) without parsing the output of show create table? This information is not in information_schema.key_column_usage (in MySQL 5.1, anyway), but is it somewhere else in information_schema?

  • 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-05T19:15:54+00:00Added an answer on June 5, 2026 at 7:15 pm

    Try to use information_schema.STATISTICS table (SUB_PART field) –

    SELECT
      TABLE_SCHEMA, TABLE_NAME, INDEX_NAME, SUB_PART
    FROM
      information_schema.STATISTICS
    

    or

    SHOW INDEX statement.

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

Sidebar

Related Questions

My question is about indexes and primary keys. Let's suppose we have a table
Let's suppose I have the following table (let's call it my_table ): CREATE TABLE
Suppose that I have a request handler that accepts an argument: key And let
Let's suppose I have a table as such: ID | Date | Owner |
Suppose I have a simple MySQL table that looks like this: CREATE TABLE `my_table`
Let's suppose we have a table: id1 id2 1 2 2 1 3 4
Let's suppose I have a table in my database with 1.000.000 records. If I
Let suppose my table can have values from 000 to 999 (three digits and
Suppose I have a user table that creates strong relationships (Enforce Foreign Key Constraint)
Ok, let's suppose we have members table. There is a field called, let's say,

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.