deepakaa
01-09-2004, 07:11 AM
my database is as shown below
student id.....name.............family name..........country........
....001...........X......................A.....................USA.... ....
....002...........Y......................B......................CANADA .....
....003...........z......................c......................Brazil .....
....
....
table 2 :
student id........subject............marks.....remarks...
....001............maths.................50.....needs to improve,fail in lab
....001...........chemistry..............60......fail in lab
....002............physics................80.....good in lab, good in theory
....003............english................75.....good
....003............french.................85.......very good
now i want to write a sql statement to perform search according to the random word given by the user in a text box.....the word given by the user can be anything like contry name-usa, or even it can be a single word from the remarks column like 'lab' or 'good'....and in result it has to show the corresponding data from both the tables
pls tell me how to write sql statement for this...
thanx.
student id.....name.............family name..........country........
....001...........X......................A.....................USA.... ....
....002...........Y......................B......................CANADA .....
....003...........z......................c......................Brazil .....
....
....
table 2 :
student id........subject............marks.....remarks...
....001............maths.................50.....needs to improve,fail in lab
....001...........chemistry..............60......fail in lab
....002............physics................80.....good in lab, good in theory
....003............english................75.....good
....003............french.................85.......very good
now i want to write a sql statement to perform search according to the random word given by the user in a text box.....the word given by the user can be anything like contry name-usa, or even it can be a single word from the remarks column like 'lab' or 'good'....and in result it has to show the corresponding data from both the tables
pls tell me how to write sql statement for this...
thanx.