
SQL Server Introduction
History of SQL Server
Hardware and software requirements
Check SQL Instance name and Version
How to create Data base and tables for the first time
DDL -- CREATE , ALTER , DROP , RENAME,TRUNCATE
DML --INSERT , UPDATE ,DELETE , SELECT
TCL -- COMMIT , ROLL BACK , SAVEPOINT
DCL -- GRANT , REVOKE
create and drop
CREATE DATABSE <Name of the Database>
CREATE TABLE <NAME of the table>
How to check definition of table in SQL
SQL Command - Insert examples
Update : Update the existing data
UPdate <Table Name>
Set <Column Name >=<New Value>
UPDATE <TAble Name>
Set <Column Name>=<New Value>
WHERE IdEmp=Number of the emp
DELETE --delete records from table
DELETE FROM <Table Name>
DELETE FROM <TABLE NAME> WHERE <CONDITION>
SQL DDL - Truncate Command
Alias in SQL Server
SQL Server Installation and Setup for the first time on Windows Machine
Joins :
a. Inner Join
a. Inner Join
b. Self Join
b. Outer Join
a. Left Outer Join
b. Right Outer Join
c. Full Outer Join
c. Cross Join
Inner Joins :
SELECT Col1, Col2 ..
FROM Table1 INNER JOIN Table2 ON
Table1.Col1=Table2.Col2
Outer Joins :
a. Left Outer Join : COmmon Data + Data left over left section
b. Right Outer Join / Common Data + Data Left over in Right Section
c. Full Outer Join :
Common Data + Data left in Left table +
Data Left In Right Section
Left Outer Join :
Result = Common Data + Data left over in Left Side table
2 Common + 2 Left in Left Side TABLE
Right Outer Join :
Result = Common Data +
Data/Records Left over in Right Side Table
Full Outer Join :
Result = Common Data +
Data Left over in Left Side TABLE+
Data Left Over in Right Side TABLE
Cross Join or Cartesian Joins in SQL
SQL Backup and Restore concept
SQL (Structured Query Language)
SQL stands for “Structured Query Language” and can be pronounced as “SQL” or “sequel – (Structured English Query Language)”.SQL (Structured Query Language) is used to modify and access data or information from a storage area called database.
SQL Commands:
SQL commands are instructions used to communicate with the database to perform specific task that work with data.
Data Definition Language (DDL) - These SQL commands are used for creating, modifying, and dropping the structure of database objects. The commands are CREATE, ALTER, DROP, RENAME, and TRUNCATE.
Data Manipulation Language (DML) - These SQL commands are used for storing, retrieving, modifying, and deleting data. These commands are SELECT, INSERT, UPDATE, and DELETE.
Transaction Control Language (TCL) - These SQL commands are used for managing changes affecting the data. These commands are COMMIT, ROLLBACK, and SAVEPOINT.
Data Control Language (DCL) - These SQL commands are used for providing security to database objects. These commands are GRANT and REVOKE.
CREATE TABLE
CREATE TABLE table name
(column_name1 datatype,
column_name2 datatype,
column name datatype
);
table name - is the name of the table.
column_name1, column_name2.... - is the name of the columns
datatype - is the datatype for the column like char, date, number etc.
Many more examples on SQL Server 2016 and SQL Server 2019
Will try to cover sql performance tuning and trouble shooting concepts as well.
how to create jobs in sql agents and trouble shooting concepts