retagged by
909 views

2 Answers

3 votes
3 votes

B is correct.

SELF JOIN: As the name signifies, in SELF JOIN a table is joined to itself. That is, each row of the table is joined with itself and all other rows depending on some conditions. In other words we can say that it is a join between two copies of the same table.Syntax:

SELECT a.coulmn1 , b.column2
FROM table_name a, table_name b
WHERE some_condition;

table_name: Name of the table.
some_condition: Condition for selecting the rows.

Example Queries(SELF JOIN):

SELECT a.ROLL_NO , b.NAME
FROM Student a, Student b
WHERE a.ROLL_NO < b.ROLL_NO;

Output:
tableeee

Ref: https://www.geeksforgeeks.org/sql-join-cartesian-join-self-join/

0 votes
0 votes

Answer: B

A self JOIN is a regular join, but the table is joined with itself.

Example:- SELECT A.CustomerName AS CustomerName1, B.CustomerName AS CustomerName2, A.City
FROM Customers A, Customers B
WHERE A.CustomerID <> B.CustomerID
AND A.City = B.City
ORDER BY A.City;

references:- https://www.w3schools.com/sql/sql_join_self.asp

Answer:

Related questions

1 votes
1 votes
2 answers
1
admin asked Mar 30, 2020
537 views
Consider the join of a relation $R$ with relation $S$. If $R$ has $m$ tuples and $S$ has $n$ tuples, then the maximum size of join is$mn$$m+n$$(m+n)/2$$2(m+n)$
2 votes
2 votes
2 answers
2
admin asked Mar 30, 2020
942 views
If $R$ is a relation in Relational Data Model and $A_1,A_2,\dots A_n$ are the attributes of relation $R$, what is the cardinality of $R$ expressed in terms of domain of a...
1 votes
1 votes
1 answer
3
admin asked Mar 30, 2020
818 views
'AS' clause is used in SQL forSelection operationRename operationJoin OperationProjection Operation
1 votes
1 votes
1 answer
4
admin asked Mar 30, 2020
1,099 views
Related fields in a database are grouped to form adata filedata recordmenubank