Is it possible to search all tables in a Mysql database?


Question:
Hello everyone,

I would like to ask if it is possible to search MySQL database which contains about 12 tables
in one query, because I want to use "LIMIT 0,30" for paging because the returned result would be large.

I tried writing the following but I didn't give me any results.
SELECT scholarship.serialNum, scholarship.category, scholarship.description, acceptnums.serialNum,
acceptnums.category, acceptnums.description, conference.serialNum, conference.category,
conference.description, occupancy.serialNum, occupancy.category, occupancy.description,
hiring.serialNum.....
FROM scholarship, acceptnums,transRules, conference, occupancy, hiring.........
WHERE scholarship.description LIKE '%sara%' OR scholarship.decision LIKE '%sara%'
OR scholarship.name LIKE '%sara%' OR acceptnums.description LIKE '%sara%'
OR acceptnums.decision LIKE '%sara%' OR acceptnums.nums LIKE '%sara%'
OR conference.description .......

Answer:
It is possible that you have just asked too much.
It is more likely you have made a little syntactic mistake or semantic mistake.
...however to make a query like that then there must be a bit of a design problem in your database.
If you really need to check all tables then you could break the query down into a dozen smaller queries which could actually be more efficient. You can still collect the data and do with it as you please.
More Questions & Answers...
  • Does a degree in business pay off after college? What job can you find if you're jobless after college?
  • How do I make finding college scholarships less stressful?
  • What are some scholarships that are good?
  • What is the best college scholarships and/or school loan to apply for?
  • After college - move in with dating partner or alone?
  • Do universities award scholarships for those wishing to attend law school and if so how do you apply for them?
  • Can you write off college expenses such as tuition and books if you had to pay for it yourself? No, it's not f
  • Disowning a grown child?
  • The questions and answers post by the user, for information only, AnswersRoom.com does not guarantee the right
    Copyright © 2007 AnswersRoom.com -   Terms of Use -   Contact us

    Hot Topic