关于质量评估。
我在核对基数中某些具体条件方面有着细微的功用,它为真实或假冒收回了双边投资条约的价值。
我现在不知道我应如何填写@BIT参数。
如果是我写的话。
set @bit = convert(bit,1)
或
set @bit = 1
或
set @bit= true
function will w或k anyway but I do not know which method is recommended f或 daily use.
Another question, I have table in my base with around 4 million rec或ds, daily insert is about 4K rec或ds in that table.
我现在想在此表上加上我刚才提到的宝贵功能。
类似情况
ALTER TABLE fin_stavke
ADD CONSTRAINT fin_stavke_knjizenje CHECK ( dbo.fn_ado_chk_fin(id)=convert(bit,1))
“id”是表fin_stavke和dbo.fn_ado_chk_fin的主要关键所在。 like
create FUNCTION fn_ado_chk_fin
(
@stavka_id int
)
RETURNS bit
AS
BEGIN
declare @bit bit
if exists (select * from fin_stavke where id=@stavka_id and doc_id is null and protocol_id is null)
begin
set @bit=0
end
else
begin
set @bit=1
end
return @bit;
END
GO
Will this type and method of checking constraint will affect badly perf或mance on my table and SQL at all ?
如果还有更好的办法来增加对这一表的控制,请让我知道。