The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> select * except(field-1,field-8)
pretty
post Sep 19 2008, 09:14 AM
Post #1


Novice
**

Group: Members
Posts: 25
Joined: 10-September 08
Member No.: 6,633



Hi,

I have a huge table with a lot of fields,
From tat table i have select field1.field2.....field-n
Now i use select * query, but i need to select all except(field-1,field-
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Sep 19 2008, 09:36 AM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



If you find a way of doing it, let me know!

(But unless you are writing sql by hand, shouldn't be a problem...?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Remote DBA
post Jan 23 2009, 09:18 AM
Post #3





Group: Members
Posts: 8
Joined: 23-January 09
Member No.: 7,617



I can say for sure - no way from MySQL (or any other DBMS) side. The only way is to manage metadata on PHP side -
select COLUMN_NAME from information_schema.columns where TABLE_NAME = yourtable and TABLE_SCHEMA = yourschema
and form your own field list with regard of excepted fields.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 08:53 AM