Viewing 15 posts - 196 through 210 (of 516 total)
Nice question Sean. Thanks for reminding the basics!
December 25, 2012 at 9:57 pm
demonfox (12/21/2012)
Here a reference and statement for learning
1. COUNT(*) returns the number of items in a group. This includes NULL values and duplicates.
2. COUNT(ALL expression) evaluates...
December 21, 2012 at 8:02 pm
Yggaz (12/21/2012)
Lokesh Vij (12/21/2012)
I do not agree with this. COUNT(*) only considers counting the number of rows. It does not even bother to take a look at the columns and...
December 21, 2012 at 8:35 am
Yggaz (12/21/2012)
However, it is uncompatible with DISTINCT clause.
SELECT COUNT(col1) as cnt_col1
...
December 21, 2012 at 2:44 am
vinu512 (12/20/2012)
Are you executing the same script that I posted??.....It seems to work perfectly on my box and I think on Cadavre's box as well.
I think your script is fine!
December 20, 2012 at 11:11 pm
Cadavre (12/20/2012)
December 20, 2012 at 11:09 pm
Lidou123 (12/20/2012)
Hi Lokesh,that works well with index .
Thank U !!!!!!!!!
Gald that you found out a way to improve the query using an Index 🙂
December 20, 2012 at 11:07 pm
Good Question!
And very rightly pointed out in the explanation that aggregate functions does not take NULL values into account. This is the reason you get the following warning when using...
December 20, 2012 at 10:46 pm
SQLRNNR (12/20/2012)
Stewart "Arturius" Campbell (12/20/2012)
It depends on whether filtered indexes are utilised or not, etc.
However, it could be that...
December 20, 2012 at 12:41 am
Here you go..
-- Creating table
CREATE TABLE year_week_value
(
year INT,
week INT,
value INT
...
December 19, 2012 at 11:19 pm
Yggaz (12/19/2012)
Lokesh Vij (12/19/2012) Ideally, both Unique constraint and Unique index are same as Unique Constraint creates Unique Index to maintain the constraint to prevent duplicate keys.
They are definitely not....
December 19, 2012 at 9:38 pm
I am sorry to say, looking at the correct answer, the question seems to be confusing! The question should have mentioned "Unique Index" instead of "Unique Constraint". Ideally, both Unique...
December 19, 2012 at 9:21 pm
palotaiarpad (12/19/2012)
For me is a possible source of inconsitency.
Not sure why you said this as "inconsistency"...it's just the property of TRUNCATE command!
December 19, 2012 at 3:28 am
Viewing 15 posts - 196 through 210 (of 516 total)