Tags » T-SQL

SQL Trace And The Stream Of Query Plans

In 8 Ways To Hunt T-SQL Query Plans, we looked at some simple ways to get our hands on those valuable query plans. However, sometimes we might want to record query plans as part of a bigger effort to profile and troubleshoot a server, or perhaps optimize it for a given workload. 2,425 more words

T-SQL

SQL Server - Cursor Example

Cursors in SQL Server allow developers to iterate through a collection of values, normally based off a select statement. This is very useful for scripts that must apply to many items at once. 89 more words

SQL Server

Putting sp_ at the beginning of your stored procedure.

Every now and again you see articles and posts about putting sp_ at the beginning of a stored procedure. So what does that do and why should we care? 299 more words

Microsoft SQL Server

SQL SERVER - SSMS Trick - Generating CSV file using Management Studio

In my previous blog I talked about using SQLCMD to generate a comma separate files for the table data.

Some blog readers reported that why we should use SQLCMD or BCP to generate the file when the same can be achieved using SQL Server Management Studio itself. 277 more words

SQL Authority

SQL Myth : Char vs Varchar

I am not here to tell you the difference between Char and Varchar(that you will get from various websites).  I wish to prove a common answer I got while taking interviews. 208 more words

T-SQL

SQL SERVER - FIX - The term 'Invoke-Sqlcmd' is not recognized as the name of a cmdlet

It’s always a fun to learn and share new thing which I learn about any technology. So I decided to spend my weekend at home quietly, so I could learn some scripting using PowerShell and SQL Server. 442 more words

SQL Authority

Alternate For Count

We always need to find the no of records in any table depending upon the situation and We always use count(*) or
count(1) function to calculate the no of rows in the table. 212 more words

Alternate Of Count(*)