- 博客(5)
- 收藏
- 关注
原创 SQL server触发器之update(instead of)
在选修表 SC(SNO,CNO,GRADE)中,建立一个update触发器,要求修改成绩后,平均成绩不可超过65分。 create trigger update_grade on SC instead of update as declare @SNO char(10) declare @grade int select @SNO=SNO from inserted select @grade=AVG(GRADE) from SC where SNO=@SNO if @grade>65 prin
2021-04-28 13:16:43
5583
原创 C++约瑟夫环(顺序循环队列)
#include<iostream> #include<malloc.h> #define maxsize 50 using namespace std; //结构体定义 typedef struct { int data[maxsize]; int front,rear; }queue; //循环队列初始化函数 void create(queue *&q) { q=(queue *)malloc(sizeof(queue)); q->front=q-&.
2021-04-28 12:55:31
956
1
原创 c++顺序队列实现杨辉三角
#include<iostream> #include<malloc.h> #define maxsize 50 using namespace std; //结构体定义 typedef struct { int data[maxsize]; int front,rear; }queue; //初始化队列 void create(queue *&q) { q=(queue *)malloc(sizeof(queue)); q->fron.
2021-04-27 22:06:47
672
原创 C++模式串匹配
BF与KMP算法 #include<iostream> #define maxsize 50 using namespace std; typedef struct { char data[maxsize]; int length; }Sqstring; //创建目标串和模式串 void create(Sqstring &s) { int i=0; cin>>s.data; while(s.data[i]!='\0') { i++;
2021-04-27 13:20:34
434
原创 SQL server 触发器 instead of
数据库SQL SERVER触发器操作(部分) 使用instead of insert 在 课程表COURSE 中设置触发器,使老师张青的教授课程不超过3门 CREATE TRIGGER INSERT_ZHANGQING(触发器名) ON COURSE(表名) INSTEAD OF INSERT AS DECLARE @TEACHER CHAR(10) DECLARE @SUM INT (定义局部变量)【用于查询条件】{定义变量前需要加@} SELECT @T...
2021-04-26 22:04:09
1503
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅