我正在尝试添加“待处理”列

有两个表“文档”和“批准”

我在网格视图中显示文档表,但在这里我想再添加一列“待定”列

像这样

docid docname file documnettype deptype status
1    abc      abc.pdf  pdf        finance  pending


我想在用户上传文档时添加“待处理”列,然后其状态自动显示为待处理。

在“批准”表中,有批准,拒绝和待处理

create procedure sppendingfilesss
as
    select  DocumentInfo.DepID,DocumentInfo.DocName,DocumentInfo.Uploadfile,DocType.DocType,Department.         DepType,ApproveType.ApproveType
    from DocumentInfo inner join DocType on
         DocumentInfo.DocTypeID=DocType.DocTypeID
    inner join Department on DocumentInfo.DepID=Department.DepID
    inner join ApproveType  on DocumentInfo.ApproveID=ApproveType.ApproveID  and
         (ApproveType.ApproveType=2)


任何解决方案

最佳答案

???您在谈论:

alter table ApproveType
    add [Status] varchar(10) null
    constraint default_Pending default 'pending';

09-12 03:07