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

Search In

SQL : How to Delete using INNER JOIN in SQL Server ?

In this post we will see how to use JOIN for deleting data from SQl server table. Let us first create tables which we will use for understanding the deletion process using JOINS. -- Create table1 CREATE TABLE #Table1 (Col1 INT, Col2 VARCHAR(50)) INS

SQL : How to get last N records based on ordering of a specific column in SQL Server ?

Sometimes we may be required to get the get last N records of a table in SQL server based on ordering on a specific column . In this post we will create a query to get the result. First let us create a table which we will use in our query. CREATE T

SQL: WHERE ,AND and OR Clause

1. SQL WHERE Clause:- SQL WHERE Clause is one of the most useful feature of the SQL query as it is used to specify a condition while fetching the data from single table or joining with multiple tables,it also allows you to select specific rows i

Difference between CTE and Temp Table and Table Variable

CTE CTE stands for Common Table expressions. It was introduced with SQL Server 2005. It is a temporary result set and typically it may be a result of complex sub-query.CTE improves readability and ease in maintenance of complex queries and sub-que

Cursor in SQL Server

A Cursor allow us to retrieve data from a result set in single means row by row. Cursor are required when we need to update records in a database table one row at a time. Types of Cursors Static Cursors A static cursor populates the result

SQL Server 2012 Programmability Enhancements

SQL Server 2012 Programmability Enhancements SQL Server 2012 supports a great programmability enhancements and functions : T-SQL THROW Statement Now SQL Server 2012 has improved error handling by introducing throw statement for throwing excep

  • 278
SQL Server : How to do case sensitive search?

Sometimes during application development we need to do case sensitive search. Let us see how we can do the same in SQL Server. For illustration purpose we will use a table called Technology which has a column named Platform.Now let us say column pla

Common Table Expressions

CTE:Common Table Expressions 1)CTE's replace subqueries i.e they are result of complex queries so can be defined as temporary resultset. 2)CTE's are mainly used for recursive programming. 3)The lifetime of CTE's is the individual query it live in

SQL Server : Read only databases

Databases whose data is not required to be changed should be considered to be set as READ ONLY.Databases can be set to READ ONLY mode and back using T-SQL and SSMS. Following are the scripts that can be used to set database read only and back: --

SQL Server : Useful datetime functions to find specific dates

Following are some useful SQL Server Date functions to find specific dates. 1) Today SELECT GETDATE() 'Today' 2) Yesterday SELECT DATEADD(d,-1,GETDATE()) 'Yesterday' 3) First Day of Current Week SELECT DATEADD(wk,DATEDIFF(wk,0,GETDATE()),0) '

1 20 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: