Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
joins
Create table location ( locationid int , regionalgroup varchar(20)); insert into location( locationid , regionalgroup ) values ( 122, 'banglore'), (123 , 'delhi'), (124, 'noida'), (125, 'meerut'), (126, 'gzb'); select * from location; create table dept( deptid int, name varchar(30), locationid int ); insert into dept( deptid, name , locationid ) values( 10, 'tarun', 122), (20, 'harsh', 123), (30, 'popu', 124), (40, 'shubham', 127), (50, 'nitesh', 128); select * from dept; create table job ( name varchar(20),jobid int , post varchar(20)); insert into job (name, jobid , post) values ('tarun', 666, 'clerk'), ('harsh', 667, 'hr'), ('popu', 668, 'analyst'), ('shubham', 669, 'senior manager'), ('nitesh', 670, ' associate analyst'); select * from job; /*select location.regionalgroup,dept.name,dept.locationid,job.post from location inner join dept on location.locationid=dept.locationid inner join job on dept.name=job.name; select dept.deptid,dept.name,job.post,location.regionalgroup from location inner join dept on location.locationid=dept.locationid inner join job on dept.name=job.name where job.name='shubham'; select dept.deptid,dept.name,job.post,location.regionalgroup from location inner join dept on location.locationid=dept.locationid inner join job on dept.name=job.name where dept.name='tarun'; select location.regionalgroup,dept.name,dept.deptid from location left join dept on location.locationid=dept.locationid; select location.locationid,location.regionalgroup, dept.deptid,dept.name,dept.locationid from location left join dept on location.locationid=dept.deptid; select dept.deptid,dept.name,dept.locationid,job.name,job.jobid,job.post from dept left join job on dept.name=job.name;*/ select location.locationid,location.regionalgroup,dept.deptid,dept.name,dept.locationid from location left join dept on location.locationid=dept.locationid; select location.locationid,location.regionalgroup,dept.deptid,dept.name,dept.locationid from location right join dept on location.locationid=dept.locationid;
run
|
edit
|
history
|
help
0
QUAN LY CHUYEN BAY
Task_6_Final
mysql4
Extracting Id No
Xml Excercise 3
Query through an error in Sql Server
Group by
program2
1
SQL Server Rank Query Optimization