Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Generate xml
CREATE TABLE [dbo].[Employees]( [EmployeeID] [bigint] NOT NULL, [FirstName] [varchar](20) NULL, [Title] [varchar](50) NULL, [BirthDate] [datetime] NULL, [Salary] [money] NULL, CONSTRAINT [PK_Employees] PRIMARY KEY CLUSTERED ( [EmployeeID] ASC )) CREATE TABLE [dbo].[Customers]( [CustomerID] [int] NOT NULL, [CustomerName] [varchar](50) NULL, CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED ( [CustomerID] ASC )) CREATE TABLE [dbo].[EmployeesCustomers]( [EmployeeID] [int] NOT NULL, [CustomerID] [int] NOT NULL, CONSTRAINT [PK_EmployeesCustomers] PRIMARY KEY CLUSTERED ( [EmployeeID] ASC, [CustomerID] ASC )) INSERT INTO Employees VALUES (1,'Abraham','Team Leader' ,'1947-11-25', 100.00) INSERT INTO Employees VALUES (2,'Sarah' ,'HR Manager' ,'1967-04-20', 100.00) INSERT INTO Employees VALUES (3,'Hagar' ,'Office Cleaner','1978-08-03', 10.00) INSERT INTO Employees VALUES (4,'Ishmael','Mail Deliverer','1989-12-01', 20.00) INSERT INTO Employees VALUES (5,'Isaac' ,'Developer' ,'1995-01-01', 50.00) INSERT INTO Employees VALUES (6,'Rebekah','QA Person' ,'1995-05-13', 50.00) INSERT INTO Customers VALUES (1,'Serena Williams') INSERT INTO Customers VALUES (2,'Pat Robertson') INSERT INTO Customers VALUES (3,'Paris Hilton') INSERT INTO Customers VALUES (4,'Barak Obama') INSERT INTO Customers VALUES (5,'Arnold Schwarzenegger') INSERT INTO Customers VALUES (6,'Oprah Winfrey') INSERT INTO Customers VALUES (7,'Prince El Saudi') INSERT INTO EmployeesCustomers VALUES (1,5) INSERT INTO EmployeesCustomers VALUES (1,6) INSERT INTO EmployeesCustomers VALUES (1,7) INSERT INTO EmployeesCustomers VALUES (2,1) INSERT INTO EmployeesCustomers VALUES (2,2) INSERT INTO EmployeesCustomers VALUES (3,3) INSERT INTO EmployeesCustomers VALUES (3,4)
run
|
edit
|
history
|
help
0
WORK
Suikwan tests
ms sql 3
Common Table Expression
emp 4
Libros
SQL Server : Calculate Going Step (Yutthana Thanomklay)
Pivot unpivot
SQL Stringdata
Tucha Alexander DB QA Test Tasks Answers