Search
 
SCRIPT & CODE EXAMPLE
 

SQL

multiple row join

SELECT l.name AS subject_name,  
  t.last_name AS student_last_name,
  st.last_name AS teacher_last_name
FROM learning AS l 
JOIN subject s ON l.subject_id=s.id
JOIN student st ON l.student_id=st.id
JOIN teacher t ON l.teacher_id=t.id;
Comment

PREVIOUS NEXT
Code Example
Sql :: acceso denegado en msql 
Sql :: sql delete all except 
Sql :: database restoring error 
Sql :: NLS_NCHAR_CHARACTERSET 
Sql :: what alter does in db 
Sql :: Having trouble running COUNT in my INSERT INTO statement 
Sql :: sql get highest date from 3 tabels 
Sql :: NextBirthDayDate 
Sql :: oracle executing sqlplus commands and waiting for completion 
Sql :: update all linkedserver tables with openquery on db 
Sql :: error infor in sql server 
Sql :: scheduled mysql database backup in linux 
Sql :: To revoke create table from users 
Sql :: why we have to set the password for my sql server 
Sql :: como hacer una consulta en sql 
Sql :: low level operator in dbms 
Sql :: opensuse status MySQL 
Sql :: null plus 1 in sql 
Sql :: pgsql sum switch case 
Sql :: alter table add column integer default 0 
Sql :: list of schema with sizes (relative and absolute) in a PostgreSQL database 
Sql :: How should I pass a table name into a stored proc? 
Sql :: sql query contains multiple ids 
Sql :: sum values by month mariadb 
Sql :: mysql order two columns 
Sql :: add column in sql server ubuntu 
Sql :: write sql query to show the details start from digit 
Sql :: element is equal one of values sql server 
Sql :: sqlite escape single quote 
Sql :: Insert Row Providing Value Explicitly 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =