#TypesofSQLCommands #DMLCommands #MSSQLServerTutorials
#DataManipulationLanguage (DML)
DML commands are used for storing, modifying, and deleting data.
#DMLCommands:
INSERT: INSERT Statement is used to add new rows of data to a table.
We can Insert a records in table in 2 Methods
#INSERT
Single Row Insert
Multi row insert
INSERT with SELECT Statement
Single Row Insert
Syntax:
INSERT INTO TABLE_NAME(Col1,Col2,....)
VALUES (Col1 Exp Value, Col2 Exp Value,......)
Multi Row Insert
Syntax:
INSERT INTO TABLE_NAME(Col1,Col2,....) VALUES
(Col1 Exp Value, Col2 Exp Value,......),
(Col1 Exp Value, Col2 Exp Value,......),
.........
Insert Records with Select Statement
Syntax:
INSERT INTO Table_Name
(Col1,Col2,col3,....)
SELECT Col1 exp value, Col2 exp value,....., UNION ALL
SELECT Col1 exp value, Col2 exp value,....., UNION ALL
SELECT Col1 exp value, Col2 exp value,.....
#UPDATE:
The UPDATE Statement is used to modify the existing rows in a table
Syntax:
UPDATE Table_Name
SET Column_Name1 = Value1,
Column_Name2 = Value2, ...
WHERE Column_Name Operator Expression_Value
#DELETE:
The DELETE Statement is used to delete Single / All rows from a table.
Syntax:
DELETE FROM Table_name
WHERE Column_NamenOperator Expression_Value
Types of SQL Commands, DDL Commands in SQL, SQL Commands with Syntax and Examples
ddl commands in sql with examples | ddl commands in sql server
ddl commands in sql with syntax and examples | sql commands tutorial for beginners
sql commands with examples | types of sql statements
types of sql commands with examples | sql server tutorial for beginners
sql server tutorial for experienced | sql server tutorial for advanced