Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Task1
--Sql Server 2014 Express Edition --Batches are separated by 'go' --Task 1 CREATE TABLE ProductMaster( ProductMasterID int NOT NULL PRIMARY KEY, ProductName varchar(50), 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, 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;
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
TUAN 6 QUANLYDETAI
Fff
try catch, raiserror and throw
string splitter
Dynamic Sql command with output variable
MSQL in 10 mn ~ Lesson 9 Performing Mathematical Calculations - orderitems ~ expanded_price
SCHOOL-BUILD
DBMS ca2
ERROR
Usage of joins
Please log in to post a comment.