Querying Microsoft SQL Server : Defining Variables
Querying Microsoft SQL Server : Defining Variables: Defining Variables in SQL Server: Like other programming languages T-SQL allows to defining your...
2013-03-13
843 reads
Querying Microsoft SQL Server : Defining Variables: Defining Variables in SQL Server: Like other programming languages T-SQL allows to defining your...
2013-03-13
843 reads
Transaction Log in SQL server records all operation on database.This recoring depends on Recovery Model selected for database.You can find...
2013-03-08
635 reads
Sometimes you need to know how many and what instances of
SQL Server running in your organization over Network. You can...
2013-02-22
2,363 reads
Use following script to generate random Passwords
DECLARE @id int,@list varcharSET @list ='abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ23456789.,-_!$@#%^&*'selectreplace(SUBSTRING(CONVERT(varchar(255),NEWID()),8, 8),'-','')as RANDOM
Example:
Suppose you have a table tblUser with columns[id],[userid],[password].
CREATETABLE [dbo].[tblUser]( ...
2013-02-12
4,849 reads
What is NULL?
In SQL, A Null is an unknown or undefined value. Some interesting
operations on NULL.
--query --resultselect 3*NULL --NULLselect 3+NULL ...
2013-02-05
525 reads
Data to test:
CREATETABLE [dbo].[emp]( [emp_id]
[nchar](10)NULL, [emp_name]
[nchar](10)NULL, [salary]
[int] NULL)ON [PRIMARY] insert emp( emp_id,emp_name,salary ) select'1','ABC',-20000 insert emp( emp_id,emp_name,salary ) select'2','XYZ',-5000 insert emp( emp_id,emp_name,salary ) select'3','PQR',-7800 insert emp( emp_id,emp_name,salary...
2013-02-04
748 reads
What is SQL Server?Microsoft SQL Server is Relational database management system (RDBMS) developed and owned by Microsoft. It is a software...
2013-01-28
419 reads
DBCC Commands:
DBCC commands are most useful for
performance and troubleshooting.
The DBCC Commands are used in Maintenance, Informational use, Validation on a
database,...
2013-01-28
2,025 reads
1.Select no of Months between two dates:
SELECT DATEDIFF(MONTH,'4/1/2011','01/23/2013')+ CASE WHENDAY('4/1/2011')<DAY('01/23/2013') THEN 1 ELSE 0 END
Output:
----------------
22
2.What will be the
output of following...
2013-01-24
494 reads
FOR XML CLAUSE: Sometimes we need to data in form of XML from
Database.SQL Server provide FOR XML Clause. For XML clause...
2012-12-26
766 reads
By Rohit Garg
Demystifying KTLO: A Deep Dive into Keep The Lights On Work in IT...
By Steve Jones
The PASS Summit goes on tour this year, with a September stop in Dallas....
By Kevin3NF
Settings That Could Be Hurting Your Performance If you’ve ever created a new SQL...
Comments posted to this topic are about the item How a Legacy Logic Choked...
Comments posted to this topic are about the item Formatting Dates and Times: The...
Comments posted to this topic are about the item Query Plan Regressions --
For the Question of the day, I am going to go deep, but try to be more clear, as I feel like I didn't give enough info last time, leading folks to guess the wrong answer... :) For today's question: You’re troubleshooting a performance issue on a critical stored procedure. You notice that a previously efficient query now performs a full table scan instead of an index seek. Upon investigating, you find that an NVARCHAR parameter is being compared to a VARCHAR column in the WHERE clause. What is the most likely cause of the query plan regression?
See possible answers