|
--创建储存过程
- <div>CREATE PROCEDURE USERS_A
- @FNAME nchar(10),
- @FBILLNO varchar(10),
- <span style="white-space:pre"> </span>@FPLANDELIVERYDATE char(10),
- <span style="white-space:pre"> </span>@FTAXPRICE char(10),
- <span style="white-space:pre"> </span>@FPRICEBASEQTY nchar(10),
- <span style="white-space:pre"> </span>@FAMOUNT char(10),
- <span style="white-space:pre"> </span>@FCOSTAMOUNT char(10)
- AS
- BEGIN</div>
复制代码
-- 插入新记录
- INSERT INTO users(FNAME,FBILLNO, FPLANDELIVERYDATE,FTAXPRICE,FPRICEBASEQTY,FAMOUNT,FCOSTAMOUNT)
复制代码
- <div> VALUES ( @FNAME, @FBILLNO, @FPLANDELIVERYDATE, @FTAXPRICE, @FPRICEBASEQTY,@FAMOUNT,@FCOSTAMOUNT)</div>
复制代码- SELECT SCOPE_IDENTITY() AS ID;
复制代码
--删除--
DROP PROCEDURE USERS_A
--新增id自增长1--
ALTER TABLE users
ADD FBillNO INT IDENTITY(1,1)
--删除列--
ALTER TABLE users DROP COLUMN newid |
|