Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have 5 different tables let's say table1,table2,table3,table4,table5.
The tables have a few common columns like referenceNumber, CNIC Number, Product etc.
At my webpage there is a textbox where user can enter CNIC Number and they can perform searches.
What i want is whenever a search is performed at backend the query should run which will search through all the tables and in which ever table it finds the CNIC Number it fetches the records and display at frontend.
My problem is how should i do it.
I am thinking of creating a view and putting every tables selected fields in it and then perform searching on that view. Another thing is there are some products for which i want to highlight the result in webpage.
Please help me here.

What I have tried:

Searched through google but have not found any relevant thing.
Posted
Updated 21-May-17 23:19pm

1 solution

Learn about JOINs in SQL[^] and use INSERT INTO ... SELECT ...[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900