Hi,
I have 2 tables registration , student
registration table includes regid, mobno, status
student table includes - studid, name, address, emailid, father , mother , fathermobno, mothermobno, smsno, other details....
In the registartion form , they have to give any of their mobile nos ( fathermobno, mothermobno, smsno)
and submit the form.
then i have to check whether the mobile number they entered at the time registration is matching with any of the mobile nos in the student table.
How i can check so? could any one help me the sql query for that?
Regards
Neethu
We are glad to help with homework but you need to make some first steps:
- post the CREATE TABLE statements for all tables involved (registration, student)
- post INSERT INTO statements to populate both tables with sample data
- Attempt to write a query to perform the logic as described
- Post the results you get from your query
- Post the desired results from the query, using the tables and data from steps 1 and 2.
1 Like
Hint:
Have a looks at IF EXISTS () check in books online
It takes a simple inner join between the columns in the two tables. They taught you how to do joins, didn't they?