3>
4>
5> CREATE TABLE myusers(
6> UserID varchar(30)NOT NULL PRIMARY KEY,
7> FirstName varchar(30),
8> LastName varchar(30),
9> EmployeeType char(1) NOT NULL,
10> DBAccess varchar(30),
11> StartDate datetime,
12> ExpDate datetime
13> )
14> GO
1>
2> CREATE PROC pr_updateuser(@UserID varchar(30), @NewExpDate datetime)
3> AS
4> UPDATE myusers
5> SET ExpDate = @NewExpDate
6> Where UserID = @UserID
7> IF @@rowcount = 1
8> PRINT "User Updated"
9> ELSE
10> PRINT "Invalid UserID entered"
11> GO
1>
2> drop PROC pr_updateuser;
3> GO
1>
2> drop table myusers;
3> GO