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 |
How can you check the version of sql server?
how can we know that how many users are connected in perticuler server??????
logshipping is Any difference 2000 and 2005?
Can we check locks in database? If so, how can we do this lock check?
What is the new security features added in sql server 2016? : sql server security
How to write character string constants or literals in ms sql server?
What is data block and how to define data block size?
can you any body tell me while running BCP Out in instance in sql server 2000 is getting error. Error = [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.?
what is IDE,DMV in sql server?
There is a table1 with records (1,2,3,4,5,6) and table2 with records (4,5,6,7,8,9).write a query so as to get the result as 1,2,3,4,5,6,7,8,9
Can primary key be null?
What is database replicaion? What are the different types of replication you can set up in SQL Server?
5 Answers Aptech, HCL, Perpetual, SAIC,
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)