当前位置:网站首页>SQL Sever column name or number of supplied values does not match the table definition
SQL Sever column name or number of supplied values does not match the table definition
2022-06-27 07:53:00 【CSDN Q & A】
news 213, Level 16, state 1, The process usp_BorrowBook, That's ok 36 [ Batch start line 2]
The column name or number of values provided does not match the table definition .( How to solve this problem !!1)
This is me sql sever Code for
use BookDBGOALTER procedure usp_BorrowBook @rdID char(9), @bkID char(9)as if not exists(select * from Book where @bkID in (select bkID from Book)) begin raiserror(' The library does not have the book , Borrowing failed ',10,1) return end if not exists(select * from Reader where @rdID in (select rdID from Reader)) begin raiserror(' The library has no such readers , Borrowing failed ',16,1)WITH NOWAIT return end declare @bkStatus int select @bkStatus = bkStatus from Book where bkID = @bkID if @bkStatus =0 begin raiserror(' The book is not in the library , Can't borrow ',16,1)WITH NOWAIT return end declare @rdBorrowQty int,@canLendQty int select @rdBorrowQty = rdBorrowQty from Reader where rdID = @rdID select @canLendQty = canLendQty from ReaderType where rdType = (select rdType from Reader where rdID = @rdID) if @rdBorrowQty = @canLendQty begin raiserror(' I'm sorry ! The number of books you have borrowed has reached the maximum ! Borrowing failed !',16,1) WITH NOWAIT return end update Book set bkStatus = 0 where bkID = @bkID update Reader set rdBorrowQty = rdBorrowQty + 1 where rdID = @rdID declare @canLendDay int select @canLendDay = canLendDay from ReaderType where rdType = (select rdType from Reader where rdID = @rdID) insert into Borrow values(@rdID,@bkID,GETDATE(), DATEADD (dd, @canLendDay,GETDATE())) exec usp_BorrowBook 'rd2019002','bk2019002'边栏推荐
- C how to call line and rows when updating the database
- 磁选机是什么?
- 爬一个网页的所有导师信息
- 1-4 decimal representation and conversion
- 游戏资产复用:更快找到所需游戏资产的新方法
- Experience record of Luogu's topic brushing
- ACM课程学期总结
- 闭包问题
- Speech signal processing - concept (4): Fourier transform, short-time Fourier transform, wavelet transform
- If xn > 0 and X (n+1) /xn > 1-1/n (n=1,2,...), Prove that the series Σ xn diverges
猜你喜欢

Win10 how to manage startup items?

Helix QAC is updated to 2022.1 and will continue to provide high standard compliance coverage

八大误区,逐个击破(终篇):云难以扩展、定制性差,还会让管理员失去控制权?

No matter how good LCD and OLED display technologies are, they cannot replace this ancient display nixie tube

Speech signal feature extraction process: input speech signal - framing, pre emphasis, windowing, fft- > STFT spectrum (including amplitude and phase) - square the complex number - > amplitude spectru

JS output shape

win命令行中导入、导出数据库相关表

Online text digit recognition list summation tool

磁选机是什么?

爬一个网页的所有导师信息
随机推荐
js求所有水仙花数
盲测调查显示女码农比男码农更优秀
L'introduction en bourse de Wild Wind Pharmaceutical a pris fin: Yu pinzeng, qui avait l'intention de lever 540 millions de RMB, a effectué un investissement P2P.
基础知识 | js基础
参考 | Win11 开启热点之后电脑不能上网
Blind survey shows that female code farmers are better than male code farmers
JS use switch to output whether the result is qualified
【批处理DOS-CMD命令-汇总和小结】-环境变量、路径变量、搜索文件位置相关指令——set、path、where,cmd命令的路径参数中有空格怎么办
MSSQL how to export and delete multi table data using statements
How to view program running time (timer) in JS
Is futures reverse documentary reliable?
Custom palette for ggplot2
win10-如何管理开机启动项?
ACM课程学期总结
What is a magnetic separator?
2. QT components used in the project
js成绩奖惩例题
Time function calculation efficiency of C
Set the address book function to database maintenance, and add user name and password
Windows下mysql-8下载、安装、配置教程