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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T17:57:05+00:00 2026-06-02T17:57:05+00:00

The docs don’t mention ORDER BY and I have had no luck phrasing this

  • 0

The docs don’t mention ORDER BY and I have had no luck phrasing this query:

SHOW FIELDS FROM `TB_Main`  WHERE Type = 'mediumtext' OR Type = 'bit(1)' ORDER BY Field;

Do I have to do my ordering in my scripting?

  • 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-02T17:57:07+00:00Added an answer on June 2, 2026 at 5:57 pm

    You can directly query the information schema tables instead. As the manual says:

    The following statements are nearly equivalent:

    SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
      FROM INFORMATION_SCHEMA.COLUMNS
      WHERE table_name = 'tbl_name'
      [AND table_schema = 'db_name']
      [AND column_name LIKE 'wild']
    
    SHOW COLUMNS
      FROM tbl_name
      [FROM db_name]
      [LIKE 'wild']
    

    You can apply an ORDER BY clause to the first type of statement, since it is a normal SELECT command.

    Therefore, in place of your SHOW command, you can do:

    SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE
          TABLE_NAME = 'TB_Main'
      AND COLUMN_TYPE IN ('mediumtext', 'bit(1)')
    ORDER BY COLUMN_NAME;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ruby docs don't mention this. Does Dir.glob(*) guarantee the order of the files it
I don't understand the rationale of this code, taken from javax.swing.event.EventListenerList docs: protected void
This seems like a simple question, but the docs don't seem to have anything
In a code-snippet I have seen this: size_t w = CGImageGetWidth(inImage); The docs don't
reading this https://developers.google.com/in-app-payments/docs/tutorial Quoted from the above page: Because you sign the JWT using
Checking sys.dm_os_wait_stats looks like this for me: What does MISCELLANEOUS mean? The docs don't
I've read the simplejson docs and don't understand why it sometimes returns a json
http://clang.llvm.org/docs/BlockLanguageSpec.txt Looks really cool. However, I don't understand it. I don't see examples it.
My docs contain lists of errors. I have a view which counts the number
The docs on this are pretty shoddy. There are a number of events you

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.