T-SQL tutorial: Creating a database
The first thing you will need to do after installing SQL Server is creating a database, tables and inserting data into these tables. This is the most boring lesson, but it is necessary to do the next exercises.
<iframe width="560" height="315" src="https://www.youtube.com/embed/6e62pQgBK3Q" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<h3>Introduction</h3>
After creating a database and tables we can start learning the basics of T-SQL. In this lesson you will learn a few things: unnamed blocks, comments, variables, expression, parameters, assigning query results to variables, CASE function, WHILE, BREAK, CONTINUE.
<iframe width="560" height="315" src="https://www.youtube.com/embed/ylynpCHiby4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<h3>Views</h3>
View is a virtual table whose columns and rows are defined by a query. The two most important aspects of views are
<ol>
<li>To focus, simplify, and customize the perception each user has of the database.</li>
<li>As a security mechanism by allowing users to access data through the view, without granting the users permissions to tables.</li>
</ol>
<iframe width="560" height="315" src="https://www.youtube.com/embed/GFIvO9RkRZQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<h3>Stored procedures</h3>
The real power of T-SQL language is really the ability to create stored procedures. Stored procedures are an executable objects stored in a database (one or more SQL statements that have been precompiled into a single executable procedure).
<iframe width="560" height="315" src="https://www.youtube.com/embed/qIMRTm0h8E8" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<h3>User-Defined Functions</h3>
If you can create procedures, you can also create functions. You can create the function once, store it in the database, and call it any number of times in your application. User-defined functions (UDF) can be modified independently of the application source code. In this lesson you will learn how to create functions
<iframe width="560" height="315" src="https://www.youtube.com/embed/PFnvqHmtzv0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<h3>Cursors<h3>
Cursor is another type of object available in T-SQL that allows you to work on a single row and change the rows sequentially.
<iframe width="560" height="315" src="https://www.youtube.com/embed/3RGa1i4NZmk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<h3>Triggers<h3>
A trigger is an object that is activated when a specific event occurs. In this lesson you will get to know the triggers types, learn how to create and use them
<iframe width="560" height="315" src="https://www.youtube.com/embed/7sGWXN_pFbc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Pankajkumar PatelPosted Aug 13, 2019, 11:59 PM
Informative and useful