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

457
Views
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 answers
Answer question

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 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!