--增加 create proc usp_insertToText @productName nvarchar(20), @unit nvarchar(20), @usitPrice decimal as begin insert into TEST1 output inserted.ProductID values(@productName,@unit,@usitPrice) end select * from TEST1 usp_insertToText 'Admin','123',60 --刪除 create proc usp_updateText @id int as begin delete from TEST1 where ProductID=@id end usp_updateText @id=4 --修改 create proc usr_updateText @id int, @productName nvarchar(20), @unit nvarchar(20), @unitPrice decimal as begin update TEST1 set ProductName=@productName,Unit=@unit,UnitPrice=@unitPrice where ProductID=@id end select * from TEST1 usr_updateText @productName='admin',@unit='aaa',@unitPrice=66,@id=3