Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
self join - SQL
--Sql Server 2014 Express Edition --Batches are separated by 'go' CREATE TABLE EMPLOYEES(ID INT IDENTITY PRIMARY KEY, NAME VARCHAR(50), MANAGER_ID INT REFERENCES EMPLOYEES(ID)) GO INSERT INTO EMPLOYEES VALUES('John', 1), ('Peter', 1), ('Adam', NULL), ('James',2), ('Micheal',1) go SELECT * FROM EMPLOYEES GO SELECT E.NAME AS MANAGER, M.NAME EMP_NAME FROM EMPLOYEES E INNER JOIN EMPLOYEES M ON E.ID = M.MANAGER_ID
run
|
edit
|
history
|
help
0
kuy09:admin09@pkms99.info
Fatch data in xml format
OUTER JOIN
a
sql server dynamic 12 month time series and pivot with month year column names
MOVIE TIME
af
Libros
CTE Recursive sample
it