课程: SQL for Testers
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Field constrains
- [Instructor] Let's take a look at field constraints and how they can contribute to quality. So first of all, what are field constraints? They're basically just rules that constrain what you're allowed to do on a given column or sometimes even on the entire table. Now, there's a number of different kinds of constraints that can be applied, so let's kind of take a look at it in SQLite to get a bit of a feeling for how it works. So if we double click on the products table here, it will bring up some of the different kinds of field constraints that can be applied. So, this table here, it's got a primary key constraint applied to the product ID column. And it has a foreign key constraint applied to the category ID column. We can also apply some of these other ones. Unique, check, so on and so forth. But what do these all mean? Well, let's go through them one at a time and see if we can understand them. I'm going to start at the right and work to the left. So the default value here, I…
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。