数据记录如何限制数据库. [英] The data recording limit on how database.

查看:129
本文介绍了数据记录如何限制数据库.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何对数据库进行数据记录限制.
允许示例仅输入1000条记录.

The data recording limit on how database.
Allow example only 1000 records are entered.

推荐答案

我不太明白为什么应该限制行数,但是您可以编写一个触发器来检查行数表中现有行的数量,如果数量太大,则会生成错误.这样可以防止添加行.

以SQL Server为例,请参阅创建触发器 [
I don''t quite understand why the amount of rows should be limited but you can write a trigger that checks the amount of existing rows in a table and then generate an error if the amount is too big. This would prevent from adding rows.

For SQL Server for example see CREATE TRIGGER[^]


这篇关于数据记录如何限制数据库.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆