Posts

Showing posts with the label SSDT

KB:SQL DDL/DML

Image
DDL (Data Definition Language) provides the ability to define, create and modify database objects such as tables, views, indexes, and users. DML (Data Manipulation Language) allows for manipulating data in a database, such as inserting, updating, and deleting records. In SQL, DDL (Data Definition Language) and DML (Data Manipulation Language) are two categories of SQL commands used for different purposes: Data Definition Language (DDL) DDL commands are used to define and manage database schema, which includes creating, altering, and deleting database objects such as tables, indexes, and views. Common DDL commands include: CREATE : Used to create database objects like tables, indexes, views, etc. Example: CREATE TABLE Employees ( EmployeeID int PRIMARY KEY, FirstName varchar ( 255 ), LastName varchar ( 255 ), BirthDate date ); ALTER : Used to modify an existing database object. Example: ALTER TABLE Employees ADD COLUMN Salary decimal ( 10 , 2 ); DROP : Used to...