|
|
-
|
|
I learned about this from Pinal Dave's blog(You can see the original article in references.)
In SQL Server, while creating a table, we can give maximum length of 128 characters. However, while creating temp tables, maximum length can be of 116 characte...
|
|
-
|
|
At one point, I created a demo script whereby one could retrieve the next value in a SQL Server 2012 sequence and use that value in a UNION ALL clause. That worked up to and including CTP 3. It never worked with plain UNION. I never tested it on RC0, bu...
|
|
-
|
|
I ended my last tip about triggers on the note 'Triggers should always be written to handle multiple rows'. I searched online for different methods people have been using on handling trigger based solutions and thought it would make a good learning tip ...
|
|
-
16 Liked
| 11 Learned
| 2 Comments
|
|
I just was making some performance tests with some batches going one by one, that was returning only times of durations.
At start of every batch I called statements for cold start, so - in result - it added doubled
DBCC execution completed. If DBCC p...
|
|
-
|
|
I just happen to change the Windows Server name on one of my Virtual machine - and I learned that the sharepoint stops working if you do so. To solve the error, you can refer to: ...
|
|
-
21 Liked
| 11 Learned
| 17 Comments
|
|
I just stumbled across a weird misconception that I'd like to help you to avoid:
If you consume the results of a (non-inline) table valued function, the results are not in the same order as if you take the content óf the TVF in your query.
So, if you h...
|
|
-
10 Liked
| 10 Learned
| 4 Comments
|
|
As we know, automatically created statistics, as can be see with
SELECT * FROM sys.Stats WHERE object_id LIKE OBJECT_ID('MyTable')
(only change 'MyTable' for something else), has name starting with _WA_Sy_.
Were you ever curious what wa...
|
|
-
|
|
I stumbled across a scenario where I had to find all the triggers associated with few tables. Found the below queries and felt that they are worth sharing. I am listing the helpful sql queries!
To get a list of all the triggers in the database
sel...
|
|
-
|
|
Today, while doing query or performance analysis, I wanted to start a profiler trace on the sql server in question. But since profiler generates network traffic I was looking for another approach. I learned that we can start the trace using system store...
|
|
-
17 Liked
| 11 Learned
| 4 Comments
|
|
I saw today, in someones code, something like this:
GO 100
At first, I thought that was some typing mistake, but then I found that GO has not only function of ending batch, but also it can execute that batch many times, as specified in:
GO [c...
|
|