Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
Column names from MySQL table in the right order

I am using the following SQL command to get all column names from my table in MySQL:

SELECT column_name FROM information_schema.columns where table_name = 'сведения о фильме' and table_schema = 'videokassety2';

It give me all column names in the table 'сведения о фильме', however it sorts the results and gives me the following:

ID Компании
Год выпуска
Название фильма
Номер фильма
Основные исполнители
Характер фильма

However, I do not need sorting, I need the order in which they appear in the table itself, like the following:

enter image description here

How can I get a list of column_nmaes without any sorting?

Thank you

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The column ordinal_position has the original column ordering information:

SELECT column_name
FROM information_schema.columns 
WHERE table_name = 'сведения о фильме' AND table_schema = 'videokassety2'
ORDER BY ordinal_position;
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!