0% found this document useful (0 votes)
4 views1 page

SQL Data Types and Constraints Guide

The document outlines various SQL data types, including numeric, date and time, character and string, number, and mixed data types. It also describes SQL constraints such as CHECK, DEFAULT, FOREIGN KEY, INDEX, NOT NULL, PRIMARY KEY, and UNIQUE, which enforce rules on data integrity. Additionally, it mentions the SQL statement CREATE, used to create a new table in a database.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

SQL Data Types and Constraints Guide

The document outlines various SQL data types, including numeric, date and time, character and string, number, and mixed data types. It also describes SQL constraints such as CHECK, DEFAULT, FOREIGN KEY, INDEX, NOT NULL, PRIMARY KEY, and UNIQUE, which enforce rules on data integrity. Additionally, it mentions the SQL statement CREATE, used to create a new table in a database.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SQL Data Types

Numeric data types,

Date and Time data types

Character and String data types

Number datatype

Mixed datatype

SQL-Constraints:

CHECK That all values in a column satisfies a specific condition

DEFAULT Sets a default value for a column when no value is specified

FOREIGN KEY Uniquely identifies a row/record in another table

INDEX Used to create and retrieve data from the database very quickly

NOT NULL Ensures that a column cannot have a NULL value

PRIMARY KEY A combination of a NOT NULL and UNIQUE. Uniquely identifies each row in a table

UNIQUE Ensures that all values in a column are different

SQL Statements:

CREATE -- Create a new table in a database

You might also like