SQL BY Surya
SQL BY Surya
What is Database?
A data is a collection of facts or figures, or information that’s stored and
can be used by a computer or a program for calculation, reasoning or
discussion
or
RDBMS have a predefined schema, meaning data resides in row(records) and columns
(attributes) with a defined structure.
Eg. Mongo DB
What is SQL?
SQL stand for Structured Query Language
Create
Read
Update
Delete
R A M
pysical memory allocation
R A M
pysical memory allocation
Above syntax is for unsigned number which are greater than 0 or +ve number only
Above syntax is use for signed number which store both value +ve or -ve
TABLE
A table is database object to store data .data in table organized in rows (left to
right)and columns(top to down)
Constraints
In SQL server, a constraint is a rule that is applied to colum or group of columns in
table to ensure dat integrity and consistency.Here are some of the most common
types of constrains
To make new SQL file
With using this syntax we can create new DATABASE which is not present previously.
With using this syntax we can Delete DATABASE which is exist allready.
);
Eg.
Name VARCHAR(50),
);
This type of table is created. in which id , name , age are the different columes of the
table .
Eg.
In above syntax one row is created inside student table which consist of id as 1 name
as GANESH and age as 19.
Eg.
With using above syntax we can print table and the output is
Types of SQL Commands
DDL (Data Definition Language) :
DQL (Data Query Language) :
DML (Data Manipulation Language) :
DCL (Data Control Language) :
TCL (Transaction Control Language) :