Showing posts with label sql. Show all posts
Showing posts with label sql. Show all posts

Thursday, 17 November 2016

what are CTE? When and Why To Use CTE in SQL ?

What are CTE in SQL ? CTE are Common Table Expressions first introduced in Sql Server 2005. It is basically a result set or result holder or separate plugin / extension that can hold some complex query separately from main query and supply the named result set or result holder name in place of that complex query in main query. It really improves complexity of complex queries....

Table Valued Functions in Sql

What are Table Valued Functions in Sql ? There are two types of “User Defined” fucntions in sql server scalar function ( that returns single value in response to function call )      2. inline table valued ( that returns function result in tabulated form but query can single lined e.g.      3. return (select * from table_name). 1. Inline...

Tuesday, 1 November 2016

What are Instead of Triggers

Instead of triggers are used to reverse the default action of the query same as the word ‘insted of’ denotes. For example if we are going to execute query to delete record in Empoyee table and we want to first check whether id of employee passed Exist in database or not then we can place a “Insted of Trigger” in database on Delete Operation for that particular table and we will...

Saturday, 21 May 2016

Convert Date Format To dd/mm/yy in Sql Server

If you Mssql Server is Using Some Other Date Format For Insert Date in Date Column Then Possibly Default Date format is set to US Date Format ( mm/dd/yy ) and if you want to insert date in dd/mm/yy . In order to insert date in this format you need to set Date Format to French / British ( dd/mm/yy ) So first I recommend you to Use any of Jquery Date Picker and pass the selected...

Thursday, 20 August 2015

Difference Between Stored Procedure and Functions Sql

Stored Procedure and Functions   1. Function Must Return Value    For Stored Procedure it's Not Must to return value it's optional  2. Stored Procedures are pre-compile objects which are compiled for  first time and its compiled format is saved which executes (compiled code) whenever it is called  But Function is compiled and executed...

Difference Between Views And StoredProcedure Sql

Stored Procedure Vs Views 1. Stored Procedure are collection of pre-executed sql Statements that accepts parameters as input and depending on input parameters passed gives the Output Result Views Act like Virtual Tables That Contains set of Rows and Columns from multiple original table of Database according to defined Query Commands 2. Stored Procedure Cannot be Used as...