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 scd (slowly changing dimension)? : sql server analysis services, ssas
How to manipulate data from one table to another table ?
What is a system database and what is a user database?
Can sql servers linked to other servers?
What are 3 ways to get a count of the number of records in a table?
What are the joins in sql server? : sql server database administration
How many types of functions are there in sql server?
diffrence between function and procedure
What is the difference between Procedure and Function
4 Answers Accenture, Nagarro, TCS,
What happens if null values are involved in string operations?
What are indexers?
How to create a new schema in a database?
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)