Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

103
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda