Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Task1
--Sql Server 2014 Express Edition --Batches are separated by 'go' --Task 1 CREATE TABLE ProductMaster( ProductMasterID int NOT NULL PRIMARY KEY, ProductName varchar(100), Price Money ); go INSERT INTO ProductMaster(ProductMasterID,ProductName,Price) VALUES (1,'Laptop',500) INSERT INTO ProductMaster(ProductMasterID,ProductName,Price) VALUES (2,'Pencil',10.50) INSERT INTO ProductMaster(ProductMasterID,ProductName,Price) VALUES (3,'Bread',15.20) INSERT INTO ProductMaster(ProductMasterID,ProductName,Price) VALUES (4,'Egg',2.5); CREATE TABLE Product( ProductMasterID int PRIMARY KEY, ProductName varchar(100), Price Money ); go CREATE PROCEDURE transfer AS INSERT INTO Product SELECT * FROM ProductMaster DELETE FROM ProductMaster go EXEC transfer; SELECT * FROM Product; go DROP TABLE Product; DROP TABLE ProductMaster; go
run
|
edit
|
history
|
help
0
pivot example
Foreign keys
Pivot and Unpivot
Many-to-Many Join Example
TRAIN
NAMES
Exam_3_Final
Program2
DeletorWall
Ranking