Categories
Welcome Center
Education & Development
Discussions
Certification Preparation
Recent Posts
Groups
Free Resources
Ebooks
Free Workshops
Trending Certifications Infographic
Infosec Training
IT & Security Training
Live Boot Camps
Security Awareness Training
About Infosec Institute
Home
Certification Preparation
Microsoft
SQL Question - Constraint
Daniel333
All,
Hi, been a few weeks since I even thought about SQL. It's been slow at work so they wanted me to put some time in studying. (woohoo!) Anyhow, I am learning what a constraint is.
e.g.
RATING CHAR(1) CHECK (RATING IN (A, B,C,D)
I was hoping someone could explain to me, why we have to refer to RATING twice? Is there any logic to this? Would you ever check a constraint against another field than the one the executed the constraint?
thanks,
Find more posts tagged with
Save $250 on 2025 certification boot camps from Infosec!
Book now with code EOY2025
Button
Comments
BeaverC32
RATING CHAR(1) specifies that there is a column named RATING, and the data type is a CHAR
CHECK specifies there is a constraint, and the parameters of that constraint are within the ().
RATING IN states that the column RATING must have a value of A, B, C, or D
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of
INFOSEC Boot Camps
$250
OFF
Use code
EOY2025
to receive $250 off your 2025 certification boot camp!
BROWSE BOOT CAMPS