Hello, my name is Rodney Harris, and in these lessons, you will learn about manipulating data by querying a database, as well as learning the basics of T-SQL. We will be discussing the two main categories of SQL statement, which are DDL and DML. During this lesson, we will be discussing their differences and walk through some examples of how they are used. A structured query language, or SQL for short, is a programming language used to manage and manipulate data within a relational database. We can insert new records into a table, update existing records, or delete records that are no longer needed. This makes it easy to manage larger amounts of data and keep our database organized. We can write queries to extract data from one or more tables, thus allowing us to analyze our data and generate reports. This can be very essential for making informed decisions. Let's take a look at each of these statements in more detail using the AdventureWorks 2019 database in SQL Server. In our first example, we will start with the Create statement. The Create statement is used to create a new database object, such as a table, a view, a store procedure, or a trigger. Here's an example of how to create a new table called Employee. As we can see, this statement creates a new table called Employees, with five columns, Employee ID, first name, last name, email address, and phone number. The Employee ID column is set as our primary key. If we expand our database and look under the tables, once we refresh, we will now see our new table employees here. In our second example, we will take a look at the Alter statement. The Alter statement is used to modify the structure of an existing database object. Here's an example of how to add a new column to the Employees table. Looking at our Alter statement, Alter table indicates we are modifying a table object. Employees indicates the name of our table. The Add clause is used to add a new column to the table, followed by the name of the column HigherDate, and the data type of the column, which is Date. If we take a look at our table now, we will see this statement as a new column called HigherDate to the Employees table. In our third example, we will be truncating a database table. The best illustrate this point, we must first add sample data to our new Employees table. Next, let's execute our Select command. As we can see, we have two new records. Now, let's execute our truncate command. A truncate is used to remove all the rows from a table in a database. It is a faster, more efficient way of deleting data from a table as compared to the Delete command. As evidence of this, let's run our Select command again to see the changes. After the truncate statement is executed, we can see when we go back to our Employees table, the statement removed all of our data from the Employees table. Equally important, the truncate did not delete our table structure as the columns in our Employees table still exist. In our fourth and final example of the DDL category is the Drop statement. The Drop statement is used to delete an existing database object. Here's an example of how to delete the Employees table. Now, let's try to run our query on the Employees table again. Turning our attention to the bottom error, we can see our Employees table no longer exists in our database. Thank you for watching.