Learn how column constraints allow you to provide rules for the content of columns at the time they are defined.
- [Instructor] As you're defining your schema,…you may want to define specific rules and behaviors…for some of your columns.…This is done using constraints.…For this lesson, we're going to use the in memory database.…And, I'm gonna come over here and copy and paste…from our chapter three exercise file,…these three lines under constraints.…And we'll paste this into SID here.…You see this creates a simple table…with three columns, A B, and C, all text.…And inserts one row, only columns A and B…with the values one and two.…
And runs a select so we can see what happens.…And when I press Go, you see our table has three columns,…one, two, and null.…And the column names are A, B, and C.…In this example, you'll notice that the C column…has a null value because no data was added to that column.…Up here in our insert, we only specified…columns A and B and gave them values.…Now, if I want to disallow this behavior,…I can add a not null constraint to the definition.…Right here, I can say, not null when I define column C.…
- Understanding SQL terminology and syntax
- Creating new tables
- Inserting and updating data
- Writing basic SQL queries
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Defining functions in PHP
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times1m 52s
11. Views and Subselects
12. Defined Functions
13. A Simple CRUD Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.