CREATE TABLE #Teacher(TchrId VARCHAR(3), TeacherName VARC...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Poker Meta

Q&A about the site for serious players and enthusiasts of poker

CREATE TABLE #Teacher(TchrId VARCHAR(3), TeacherName VARCHAR(30))
 
 INSERT INTO #Teacher

 SELECT  'T1',       'Mary'
 UNION ALL     
 SELECT  'T2',      'Jim'   
 
 
CREATE TABLE #Student(StudId VARCHAR(3),TchrId VARCHAR(3), StudentName VARCHAR(30))
 
 INSERT INTO #Student        
SELECT    'S1'    ,     'T1'      ,    'Vineeth'  
UNION ALL
SELECT    'S2'    ,     'T1'      ,    'Unni'       




SELECT T.TchrId,T.TeacherName,S.StudentName 
FROM #Teacher T
FULL   JOIN #Student S ON T.TchrId = S.TchrId

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results