|
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
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 t...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
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 t...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
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 yo...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
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 yo...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
It is simple rule, but maybe some people will find this post useful.
From MSDN: "When a virtual method is called, the actual type that executes the method is not selected until run time. When a constructor
calls a virtual method, it is possible tha...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
It is simple rule, but maybe some people will find this post useful.
From MSDN: "When a virtual method is called, the actual type that executes the method is not selected until run time. When a constructor
calls a virtual method, it is possible tha...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
Sometimes it happens that we need random row (or set of randoms rows) from table.
Itzik Ben-Gan shows us, in one of his book, the efficient way to do this:
SELECT TOP(1) FROM someTable ORDER BY NEWID()
Changing the val...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
Sometimes it happens that we need random row (or set of randoms rows) from table.
Itzik Ben-Gan shows us, in one of his book, the efficient way to do this:
SELECT TOP(1) * FROM someTable ORDER BY NEWID()
Changing the v...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
I have always heard about the terms sargable and non-sargable but never really understood how they help in developing efficient sql code. Here is what I have found out...
Try to avoid WHERE clauses that are non-sargable. The term “sargable” (which i...
|
-
Sergejack knew 1 Years ago through Just Learned | 1 Point
I have always heard about the terms sargable and non-sargable but never really understood how they help in developing efficient sql code. Here is what I have found out...
Try to avoid WHERE clauses that are non-sargable. The term “sargable” (which i...
|