dbTalk Databases Forums  

searching across all fields in a row

comp.databases.mysql comp.databases.mysql


Discuss searching across all fields in a row in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John
 
Posts: n/a

Default searching across all fields in a row - 10-13-2010 , 06:37 AM






Hi

SELECT * FROM TABLE123 WHERE FULLNAME LIKE 'RED'

The above will only check one variable FULLNAME.

Is there anyway of searching across all fields in the row without listing
each variable?

There could be over 100 fields I need to search.

Regards
John

Reply With Quote
  #2  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: searching across all fields in a row - 10-13-2010 , 07:42 AM






On 10/13/2010 7:37 AM, John wrote:
Quote:
Hi

SELECT * FROM TABLE123 WHERE FULLNAME LIKE 'RED'

The above will only check one variable FULLNAME.

Is there anyway of searching across all fields in the row without listing
each variable?

There could be over 100 fields I need to search.

Regards
John



No, but if you have to search over 100 fields, I strongly suspect your
database design is not well optimized.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #3  
Old   
Captain Paralytic
 
Posts: n/a

Default Re: searching across all fields in a row - 10-14-2010 , 04:04 AM



On 13 Oct, 12:37, "John" <john1... (AT) yahoo (DOT) com> wrote:
Quote:
Hi

SELECT * FROM TABLE123 WHERE FULLNAME LIKE 'RED'

The above will only check one variable FULLNAME.

Is there anyway of searching across all fields in the row without listing
each variable?

There could be over 100 fields I need to search.

Regards
John
For a start FULLNAME LIKE 'RED' is equivalent to FULLNAME = 'RED'

Maybe you are looking for FULLTEXT searching, but as Jerry points out,
the design certainly seems questionable.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.