How to fetch records from a One to Many relationship table.
eg: wanna get details of all orders for a specific customer.
(do not want repeatation of master table records for child
table records)
Answers were Sorted based on User's Feedback
Answer / syeda
Need to define a relationship to the table and common column
of tables
ex : there is a table called college which contains the
college records like studid, studentname, batch & course.
And other table called student_details which contains
studid, firstName, lastName, fathersName, mothersName, DOB,
ContactNo & address.
Here we are fetching studid, batch, course & studentname
from collete table and DOB, ContactNo & address from
students_details , of all the students whose birth month is
April 1988
Syntax : select
a.studid,a.batch,a.course,a.studentname,b.DOB,b.ContactNo,b.address
from college a, student_details b where a.studid=b.studid
and b.DOB like '%-Apr-1988'
Is This Answer Correct ? | 4 Yes | 0 No |
Explain the third normal form(3nf)?
What happens when converting big values to integers?
What do you mean by sql server agent?
What do you mean by sql server 2005 express management tools?
What is the difference between a check constraint and a rule?
How to grant a permission in ms sql server using "grant execute" statements?
How to get the definition of a stored procedure back?
What is store procedure?
What is a trace frag? Where do we use it?
what is extended StoreProcedure ?
What is the difference between ddl and dml?
How to drop existing views from a database in ms sql server?