0% found this document useful (0 votes)
48 views2 pages

SQL Constraints and DDL Overview

Uploaded by

naveen
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)
48 views2 pages

SQL Constraints and DDL Overview

Uploaded by

naveen
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:

Types of Constraints:

 NOT NULL - Ensures that a column cannot have a NULL value


 UNIQUE - Ensures that all values in a column are unique and accept one
null values.
 PRIMARY KEY - A combination of a NOT NULL and UNIQUE. Uniquely
identifies each row in a table
 FOREIGN KEY - Prevents actions that would destroy links between
tables
 CHECK - Ensures that the values in a column satisfies a specific
condition
 DEFAULT - Sets a default value for a column if no value is specified
 CREATE INDEX - Used to create and retrieve data from the database
very quickly

Difference between truncate and delete statement:

[Link]

[Link]
statements-in-sql-server/

Syntax samples:

[Link]

DDL:

The DDL commands in SQL are used to create database schema and to define the type
and structure of the data that will be stored in a database.

Data definition language (DDL) refers to the set of SQL commands that can create and
manipulate the structures of a database. DDL statements are used to create, change, and
remove objects including indexes, triggers, tables, and views.

Acid properties:

[Link]
[Link]

For SQL injection:


[Link]

[Link]

Savepoint in transaction

[Link]

You might also like