Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Search In

SQL Server : How to Enable or Disable All the Triggers on a Table and Database?

Sometimes we need to disable trigger on a table especially when performing admin tasks on a table. Following commands provide a quick way to disable all the triggers for a table. Please note that when we are diabling triggers on a table we will ha

Differences Between IsNull() and Coalesce() Functions?

Differences Between IsNull() and Coalesce() Functions? ISNULL() Function: 1)ISNULL function is regraded as Transact-SQL function. 2)This function is used to replace NULL with the replacement value specified in second argument or from from the input

Generating Encrypted and Decrypted Password with Salt

In SQL while storing or retrieving passwords we need to ensure that it should be in encrypted format. So for doing that we first need to store it in encrypted form CREATE PROC [dbo].[uspRegisterUser] @FirstName VARCHAR(50), @LastNam

  • 239
Conditional Statements in SQL

While writing stetaments in SQL we have scenarios where manipulations based on conditions needs to be performed   For doing that we use conditional statements ALTER proc [dbo].[sp_CheckLeaveAvailability] @FromDate date, @ToDate date, @Empl

How to select second highest salary from a table?

This question is asked a lot in interviews, so here some of the methods by which one can get the second highest salary of an employee from a table. Suppose the Employee is like this ID Name Salary Table: Employee 1 P

To extract only Date from Date Time in SQL in particular format

In SQL we have situations where we want to extract date from date time and in particular format -- Extracting only Date from DateTime Type Column SELECT N.[ID],N.[Message],N.[LocationID],N.[TargetUserID],N.[Url],CONCAT(U.[FirstName],U.[LastName])

SQL wildcards

SQL wildcards are used within a table to search for data.  Usage of wildcard characters in SQL call for SQL LIKE operator, which enables to hold a comparison between a value and similar values. Following are the two types of wildcard operators

Differece between ROW_NUMBER(), RANK() and DENSE_RANK() in SQL Server

ROW_NUMBER() RANK() DENSE_RANK()   All of these three functions are used to calculate the Id of row but in different way. I am using the below script for examples ​ CREATE TABLE Marks ( SubjectId INT, Marks INT ) INSERT INTO Marks VAL

Alias

Alias is basically renaming a table temporarily for a sql statement. The rename is done only for a particular statement is temporory. ex The syntax of table alias is as follows SELECT column1, column2.... FROM table_name AS alias_name WHERE [con

Difference between ROW_NUMBER() and RANK().

ROW_NUMBER() This function is used to assign a unique id to each row returned by the sql query fired. RANK() This function is similar to ROW_NUMBER() with the only difference it leaves a gap between the groups i.e this function assi

1 27 54
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: