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 |
what is a schema in sql server 2005? : Sql server database administration
Explain what are sparse columns?
How to convert a unicode strings to non-unicode strings?
What do you understand by a view? What does the with check option clause for a view do?
Define right outer join?
What is the difference between MVC and Teir Architecher? Plz explain with Layyered Programming example...? Thanks
What is the usage of sign function?
If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?
How to get a list of all tables with "sys.tables" view in ms sql server?
What is the system function to get the current user's user id?
How can we determine what objects a user-defined function depends upon?
How you can find out if an index is useful to the optimizer?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)