Quantcast
Channel: ForDevs » Sql Server
Browsing all 10 articles
Browse latest View live

SQL Server Connection Using Integrated Security

When we are connecting sql server using windows authentication then we do not need to give the user name and pwd in the connection string. We have to provide the Integrated Security property to true....

View Article



Check Sql Server database is Case Sensitive or Insensitive (Collation)

If the collation property of a data base is 1.Latin1_General_BIN its case-sensitive2.SQL_Latin1_General_CP1_CI_AS or Latin1_General_CI_AI its case-insensitive There are two ways to find out the SQL...

View Article

Create Database,Table and Procedure in Sql Server – Beginners

Database Creation : CREATE DATABASE EMPLOYEE Table Creation : CREATE TABLE EMPINFO(ROWID INT IDENTITY(1,1) NOT NULL,EMPID INT NOT NULL,EMPNAME VARCHAR(50) NOT NULL,EMPDEPT VARCHAR(3) NOT NULL,EMPSAL...

View Article

Using OVER() with Aggregate Functions in Sql Server 2005

1.you can now add aggregate functions to any SELECT (even without a GROUP BY clause) by specifying an OVER() partition for each function. 2.SUM(..) OVER(..) is most useful for calculating a Total or...

View Article

Usage of Stored Procedures

Reduce network traffic: You have to send the SQL statement across the network. With sprocs, you can execute SQL in batches, which is also more efficient. Caching query plan: The first time the stored...

View Article


Create backup copy of table in SQLServer – (Select Into)

SELECT INTO statement can be used to create backup copy of a table.This sql statement selects records from one table according to the selection we make and inserts the result set into another new table...

View Article

CASE Function in SQL Server 2005

Sql Case Function : The CASE function allows you to evaluate a column value on a row against multiple criteria, where each criterion might return a different value CASE is just a searched (or lookup)...

View Article

View Existing Triggers – Drop One or More Triggers in Sql Server 2005

To view the existing triggers in the database SELECT * FROM sys.triggers OR SELECT * FROM sysobjects WHERE xtype='TR' To view the existing triggers in a specified table sp_helptrigger tablename To drop...

View Article


How to Get The List Of All Tables in a Database – Sql Server 2005

We a can get the list of all tables of a database in different ways : - 1. SELECT * FROM sys.TABLES 2. SELECT * FROM sysobjects WHERE TYPE='U' 3. SELECT * FROM information_schema.TABLES WHERE...

View Article


How to find 2nd highest value in a table ?

To Find the 2nd Maximum Of Mark in a Data Set SELECT * FROM Student a WHERE 2=(SELECT COUNT(DISTINCT Mark) FROM Student b WHERE a.Mark<=b.Mark) To Find the 2nd Minimum Of Mark in a Data Set...

View Article
Browsing all 10 articles
Browse latest View live


Latest Images