DDL and DML commands

DDL and DML commands

In SQL Server 2008, there are two main types of SQL commands: Data Definition Language (DDL) and Data Manipulation Language (DML) commands.

DDL commands are used to define the database schema and structure. These commands include:

  • CREATE: used to create a new database, table, index, view, or other database object.
  • ALTER: used to modify the structure of an existing database object.
  • DROP: used to remove an existing database object.
  • TRUNCATE: used to remove all data from a table, while keeping the structure intact.

DML commands, on the other hand, are used to manipulate data within the database. These commands include:

  • SELECT: used to retrieve data from one or more tables.
  • INSERT: used to add new data into a table.
  • UPDATE: used to modify existing data in a table.
  • DELETE: used to remove data from a table.

Both DDL and DML commands are essential to working with a SQL Server database. DDL commands are used to set up the structure and schema of the database, while DML commands are used to manipulate the data within the database.

Apply for SQL Server 2008 Certification!!

https://www.vskills.in/certification/certified-sql-server-2008-programmer

Back to Tutorials

Share this post
[social_warfare]
SQL Operations
Query commands, nested and correlated queries

Get industry recognized certification – Contact us

keyboard_arrow_up