View in SQL By Sagar Jaybhay 2020

Sql Server By Sagar Jaybhay

In this article Sagar Jaybhay explain what is View. What is the use of View. what is the advantages of views in SQL server. View The view is saved SQL query or we can call it a virtual table. We have these 2 tables and by joining these 2 tables we want to output. By joining these 2 tables we get the above result. Now we want to create a view, like other create statement like create a table, create procedure we have to create view statement Below is a…

Read More

All About Index In SQL Server 2020

Sql Server By Sagar Jaybhay

In this article you will understand what is Index In SQL Server. How To Create Index and Different Types of Indexes In SQL By Sagar Jaybhay. Also You will leran Unique and Non Unique Index what is the difference between them. Index In SQL Server Index is used to find data from the table quickly. An index is created on views and tables. It is similar to the book index. If you apply index it will improve the query performance drastically. If there is no index then the query engine…

Read More

SQL Temp Table: Temporary Table In Detail 2020

Sql Server By Sagar Jaybhay

In this article, you will able to understand Temporary table in detail in SQL, with how many different types of Temporary table present in SQL server. What is the difference between these Temporary tables. Temporary Tables In Detail Temporary tables are similar to permanent tables. When you create a permanent table they will create the database you specify and remain in that database permanently until you delete it. Temporary tables get created in tempdb automatically and deleted automatically when no longer used them. There are 2 different types of temporary…

Read More

User Defined Function In SQL Server-2020

Sql Server By Sagar Jaybhay

In this article, we will understand User Defined Function in sql server with different types of function in sql server a) Scalar function b) Inline table-valued functions c) Multi-statement table-valued functions User-defined Functions In SQL Server User-defined functions also called UDF. In SQL server there are 3 different types of User-Defined functions Scalar function. Inline table-valued functions. Multi-statement table-valued functions. You can find these functions folder in SQL Server Management studio see below image Scalar Functions The scalar function is a function that may or may not have parameters but…

Read More

Case and Convert Function In SQL Server 2020

Sql Server By Sagar Jaybhay

In this article we will understand case and convert function in sql server in detail and what is the difference between case and convert function in sql server. Previous SQL Articles :- https://sagarjaybhay.com/category/sql-server/ When we want to convert from one data-type to another data-type we have Case and Convert function In SQL server. Cast function in SQL Server This Cast function can convert an expression to the provided datatype. In short, it is used to convert one data type to another data-type. General syntax: In the above  function, we will…

Read More

SQL Join | Inner | Left | Right | Outer | Self | Cross Join 2019

Sql Server By Sagar Jaybhay

SQL Join By Sagar Jaybhay Join statement is used to combine data or rows from more than one table which is based on a common field between them. In general 2 tables are related to each other by using foreign key constrains. There are different types of join Inner Join Outer Join Cross Join In this Outer Join is divided into 3 sub joins. Left Join or left outer join Right Outer Join or Right Join Full Join or Full Outer Join. See below image we use this 2 tables…

Read More

Select:-Things to know about select statement in SQL 2019

Sql Server By Sagar Jaybhay

Identity Column & Cascading referential Integrity Constraints In SQL By Sagar Jaybhay About Tables In DataBase By Sagar Jaybhay SELECT Statement in SQL The select clause can retrieve 0 or more rows from one or more tables from the database or it can retrieve rows from views also. The select statement is used to select data from a table or database. The data which is our of our select query is called a result set. The select is a commonly used statement in SQL. Means for fetching the data from…

Read More

Identity Column & Cascading referential Integrity

Sql Server By Sagar Jaybhay

Identity Column & Cascading referential Integrity Identity Column by Sagar Jaybhay If the column is not an identity column then you need to supply the value for that column. In the above query, we have created a tblstudent table where the Id column is the Identity column. If you see closely Id Int Identity(1,10) For the above line, we have an identity(1,10) in this 1 Is Initial Seed and 10 Identity Increment. Means when you try to insert the first row it will start from 1 and when you insert…

Read More