CREATE TABLE employee(
id INTEGER NOT NULL PRIMARY KEY,
first_name VARCHAR(10),
last_name VARCHAR(10),
salary DECIMAL(10,2),
start_Date DATETIME,
region VARCHAR(10),
city VARCHAR(20),
managerid INTEGER
);
GO
INSERT INTO employee VALUES (1, 'Jason' , 'Martin', 5890,'2005-03-22','North','Vancouver',3);
GO
INSERT INTO employee VALUES (2, 'Alison', 'Mathews',4789,'2003-07-21','South','Utown',4);
GO
INSERT INTO employee VALUES (3, 'James' , 'Smith', 6678,'2001-12-01','North','Paris',5);
GO
select * from employee;
GO
CREATE PROCEDURE spIns_Employee
@FirstName nVarChar(50),
@LastName nVarChar(25),
@Salary Money
AS
INSERT INTO Employee (ID, First_name, last_Name, Salary)
SELECT 10, @FirstName, @LastName, @Salary
GO
spIns_Employee 'Gadget', 'Bond', 49.95
GO
id INTEGER NOT NULL PRIMARY KEY,
first_name VARCHAR(10),
last_name VARCHAR(10),
salary DECIMAL(10,2),
start_Date DATETIME,
region VARCHAR(10),
city VARCHAR(20),
managerid INTEGER
);
GO
INSERT INTO employee VALUES (1, 'Jason' , 'Martin', 5890,'2005-03-22','North','Vancouver',3);
GO
INSERT INTO employee VALUES (2, 'Alison', 'Mathews',4789,'2003-07-21','South','Utown',4);
GO
INSERT INTO employee VALUES (3, 'James' , 'Smith', 6678,'2001-12-01','North','Paris',5);
GO
select * from employee;
GO
CREATE PROCEDURE spIns_Employee
@FirstName nVarChar(50),
@LastName nVarChar(25),
@Salary Money
AS
INSERT INTO Employee (ID, First_name, last_Name, Salary)
SELECT 10, @FirstName, @LastName, @Salary
GO
spIns_Employee 'Gadget', 'Bond', 49.95
GO