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

459
Visualizações
is there any way to select all the fields data from the table except one field data using nodejs

I want to fetch all the fields data but don't want to specify the fields name and don't want to create a view. I have tried

WITH orderschema as 
(SELECT array_to_string(ARRAY(SELECT c.column_name
        FROM information_schema.columns As c
            WHERE table_name = 'orders' 
            AND c.column_name NOT IN('Quantity')
    ), ','))
    SELECT * from orderschema

but this is returning the schema fields name as a single string and i can't use this single string to get all the fields from the orders table. is there any way to exclude the field directly in psql?

about 4 years ago · Santiago Gelvez
1 Respostas
Responde à pergunta

0

Generally speaking no such way exists.

But - if you plan on converting data to JSON in Pg (which you shouldn't for performance reasons, but you might if you really, really want to), you could just delete the column from json.

The best way, though, is to write query that lists only the columns you need.

about 4 years ago · Santiago Gelvez 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