Easy To Learning
  • Login
  • Sign Up
  • Q&A
  • Home
  • Php Tutorial
  • MySql Tutorial
  • Object-Oriented Programming
  • Java Tutorial
  • HTML Tutorial
  • React JS Tutorials
  • Free Projects
  • Blogs & Articles
  • Others
    • About Us
    • Contact Us
MySQL Constraints
Easy To Learning

Education Needs Complete Solution

Online Ask Question Question And Answer
  1. Home
  2. MySql Tutorials
  3. MySQL Constraints

MySql Tutorial

Basic MySql Tutorials

  • MySql Table Content
  • MySQL Introduction
  • MySQL Constraints
  • MySQL Connection In PHP
  • MySQL Create Database In PHP
  • MySQL Create Table using PHP
  • MySQL Insert Using PHP
  • MySQL Update Using PHP
  • MySQL Delete Using PHP
  • MySQL Select Using PHP
  • MySQL Order By Using PHP
  • MySQL Where Clause Using PHP
  • MySQL Fetch Array Using PHP
  • MySQL Fetch Assoc Using PHP
  • MySQL Fetch Row Using PHP
  • MySQL Fetch Object Using PHP
  • MySQL Basic Queries

Basic MySqli Tutorials

  • MySQLi Connection In PHP
  • MySQLi Create Database In PHP
  • MySQLi Create Table using PHP
  • MySQLi Insert Using PHP
  • MySQLi Update Using PHP
  • MySQLi Delete Using PHP
  • MySQLi Select Using PHP
  • MySQLi Order By Using PHP
  • MySQLi Where Clause Using PHP
  • MySQLi Fetch Array Using PHP
  • MySQLi Fetch Assoc Using PHP
  • MySQLi Fetch Row Using PHP
  • MySQLi Fetch Object Using PHP
  • MySQLi Predefined Function In PHP

MySQL Constraints

Constraints are the utilities that restrict the entry of data into the table if the specified condition is not fulfilled. They are primarily of the following type -- Primary key, foreign key, check, unique, not null

Primary Key : Primary key prevents duplicate entry. It is called row-based constraints(it means inside a table there is only one field can be declared primary ) No null Value can be entered.

Unique Key: It will not let enter a duplicate value in the field. But a Null Value can be entered. It is called a column-based constraint.

Foreign Key: A column is called a foreign key when it refers to the primary key column of another table.

Not NULL: It will not allow entering null Value in the field. But duplicate value can be entered.

MySQL Index:

indexing is basically of four types : => Primary => Unique => Index => full-text

Primary Key:

 

  • Primary Key prevent duplicate entry.
  • Only one field can be defined Primary
  • it is row-based Constraint

Unique Key:

  • Unique Key also prevents the duplicate entry.
  • More than one field can be defined as unique
  • it is column-based Constraint

Index and full-text:

Index and full-text both are used for filtration. when you need to search if you have to write the full name of field i.e. indexing. on the other hand, if the searching is based on the basis of characters it is full-text.

Series: MySql Tutorials Hub
All Topics
Free Download Projects
Previous Chapter
Next Chapter

Ask a Question

Have a coding query or doubt? Ask here and get help from our community.

500 characters remaining
Submitting...
Free Download Projects
Join Telegram Group Join WhatsApp Group
Related Topics:
MySQL Constraints MySQL Constraints Tutorials

Member Sign In

Forgot?
Signing in...

Don't have an account? Register here

Create Free Account

Register Captcha
Registering...

Already have an account? Sign In

Ask a Question

500 characters remaining
Submitting...

About Easy To Learning

Easy To Learning is a comprehensive programming learning portal offering free, practical, developer-driven tutorials for PHP, Java, Python, Spring, MySQL, CSS, Bootstrap, CakePHP, and more.

Explore community-contributed questions and answers, and download ready-to-run source code projects.

Quick Links

  • Home
  • Questions & Answers
  • Download Projects
  • Blog & Articles
  • Member Login

Community

  • Telegram Group
  • WhatsApp Community
  • Ask a Question
  • Join as Member

Connect With Us

Stay updated with our newest programming tutorials and free open source projects.

© 2026 Easy To Learning. All Rights Reserved.