Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
La Project
CREATE TABLE Information( Employee_ID varchar(9), FullName varchar(20), Address Varchar(100), Contact_Information Varchar(50), CONSTRAINT INFORMATION_PK PRIMARY KEY (Employee_ID) ) /*Table2*/ CREATE TABLE Clearance( Employee_ID varchar(9), ClearanceLevel varchar(10), CompanyPosition varchar(50), FOREIGN KEY (Employee_ID) REFERENCES Information (Employee_ID) ) Insert into Information values ('HSFGERFJH', 'John Wick', '637 Ferguson Street, Boston, Massachusetts', '0918123456') Insert into Information values ('JHWDBJFEH', 'James Bond', '333 Sen. Gil J. Puyat Ave, Makati, 1200 Metro Manila', '0912349932') Insert into Information values ('23KJKWDNW', 'Nick Fury', '103 Esteban, Legazpi Village, Makati, Kalakhang Maynila', '6392919033') Insert into Information values ('HI213ASDE', 'Jason Bourne', '1320 S Dixie Hwy, Coral Gables, FL 33146, USA', '2143600235') Insert into Information values ('SDSD12354', 'Leonardo DiCaprio', 'Gainesville, FL 32611, USA', '0930123434') Insert into Clearance values ('HSFGERFJH', '1st Level', 'Newly Employed Programmer') Insert into Clearance values ('JHWDBJFEH', '2nd Level', 'Programmer') Insert into Clearance values ('23KJKWDNW', '3rd Level', 'Senior Manager') Insert into Clearance values ('HI213ASDE', '4th Level', 'Company Vice President') Insert into Clearance values ('SDSD12354', '4th Level', 'CEO') /*Query*/ /*All Values Table 1*/ Select * from Information order by Fullname asc /*All Values Table 2*/ Select * from Clearance /*Join Query Table 1 and 2*/ SELECT Information.Employee_ID "ID", Information.Fullname "Full Name", Clearance.ClearanceLevel "Clearance", Clearance.CompanyPosition "Position" FROM Information INNER JOIN Clearance ON Information.Employee_ID=Clearance.Employee_ID /*Displays all highly prioritized personnels*/ SELECT Information.Employee_ID "ID", Information.Fullname "Full Name", Clearance.ClearanceLevel "Clearance", Clearance.CompanyPosition "Position" FROM Information INNER JOIN Clearance ON Information.Employee_ID=Clearance.Employee_ID where ClearanceLevel='4th Level'
run
|
edit
|
history
|
help
0
exp 8 XIV
Availible schedules
db_hotelc
Test row_number() ordering when CTE referenced multiple times
hello
elie homsi's code
TRIGGERS
Viernes
20181cse0012dbmsca2
First Query