本文介绍了图书馆管理系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好每一个
i我正在尝试使用sql和c开发一个图书管理系统#
在LBMS中,一个人只能获得4本书,我想在我的LENdING _DETAILS TABLE中添加一个条件,以便在NUM_OF_books_TANKEN列中不允许超过4的值。我怎么能这样做你们可以帮忙解决你的建议。
提前谢谢。
hello every one
i am trying to develop a library management system using sql and c#
in LBMS a person is allowed to take only 4 books and i want to put a condition in my LENdING _DETAILS TABLE such that no value above 4 is allowed in NUM_OF_books_TANKEN column. how could i do that can u guys help with the your suggestions.
thanks in advance.
推荐答案
select count(*) from TableName where id=@id and
insert into TableName values(id,BooksName) where status=true
create proc testing
(
@id int=0,
@books varchar(max)=null,
@nameofStudent varchar(max)=null,
@bookid varchar(max)=null
)
as
declare @tempCount int;
select @tempCount=COUNT(status) from tableName where ID=@id
if(@tempCount<4)
begin
insert into Tablename values(@id,@bookid,@nameofStudent,@books)
end
else
begin
print'this student allready have four books'
end
return
任何查询回复..
乐意帮助☺
for any query hit to reply..
happy to Help ☺
这篇关于图书馆管理系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!