Saturday, March 1, 2014

DDL vs DML in SQL Server

DDL
Data Definition Language (DDL) statements are used to define the database structure or schema. Examples:

  • CREATE - to create objects in the database
  • ALTER - alters the structure of the database
  • DROP - delete objects from the database

DML
Data Manipulation Language (DML) statements are used for managing data within schema objects. Examples:


  • SELECT - retrieve data
  • INSERT - add data
  • UPDATE - modify data
  • DELETE - remove data
Note : This is not limited to SQL Server

Related Posts:

  • DDL vs DML in SQL Server DDL Data Definition Language (DDL) statements are used to define the database structure or schema. Examples: CREATE - to create objects in the database ALTER - alters the structure of the database DROP -… Read More
  • SQL JOIN Example Joins can be quite perplexing initially hopefully this simple example will help.  Joins are used to combine data from multiple tables (usually two tables) There are three types of joins, 1. INNER 2. OUTER - FU… Read More
  • SQL GROUP BY ExampleThe GROUP BY clause causes data in a table (or any data source) to be divided into groups based on the expressions (or conditions) given in the GROUP BY clause. Seems confusing? Probably.. Let's see what it means, Say you ha… Read More
  • SQL Server Data TypesHere are the SQL server data types for quick reference, Exact numerics – (bigint, bit, decimal, int, money, numeric, smallint) Approximate numerics (float, real) Date and time (date, datetime2, datetime, datetimeoffset, t… Read More
  • SQL COUNT ExampleCOUNT returns the number of rows in a select statement (Also note that it doesn't consider null values), Note : I'll be using the AdventureWorks2008R2 sample database which can be downloaded from here, http://msftdbprodsamp… Read More

0 comments:

Post a Comment