Forum Replies Created

Viewing 15 posts - 736 through 750 (of 8,416 total)

  • RE: T-SQL Performance 1

    L' Eomot Inversé (2/17/2012)


    I guess FORCESEEK always works, though (?).

    Nothing always works :-). FORCESEEK will result in a plan with a seek operation on the hinted table (or index...

  • RE: locking in sql server

    Basit Farooq (2/17/2012)


    You can implement locks in SQL Server using locking hints read below:

    Much of that 'information' is wrong. Might have been easier/better to have simply linked to BOL...

  • RE: locking in sql server

    SQLKnowItAll (2/17/2012)


    Ok, this is a new one for me. Why would one use this?

    Application locks can be handy in all sorts of situations. One example that I use...

  • RE: SELECT TOP

    Hugo Kornelis (2/17/2012)


    Can you explain what's going on? I played around a bit with the code. Adding an ORDER BY changes the results, of course - but the execution plan...

  • RE: T-SQL Performance 1

    Hugo Kornelis (2/17/2012)


    SQL Kiwi (2/17/2012)


    John Mitchell-245523 (2/17/2012)


    Got it right, but I think the answer should be "it depends". On what? The selectivity of the data in Col [...]...

  • RE: SELECT TOP

    Hugo Kornelis (2/17/2012)


    Since this is undocumented, there is no way to guarantee this even if it is true today.

    It isn't true and there are many ways to disprove it. ...

  • RE: T-SQL Performance 1

    John Mitchell-245523 (2/17/2012)


    Got it right, but I think the answer should be "it depends". On what? The selectivity of the data in Col [...] Therefore, in the second...

  • RE: Keyboard shortcut to enable / disable IntelliSense

    guerillaunit (2/16/2012)


    Hi there,

    Is there a keyboard shorcut to turn on / off IntelliSense in Management Studio?

    In 2012 yes; the default shortcut is CTRL-Q, CTRL-I but that is customizable.

  • RE: SQL SERVER(T-SQL)

    Or:

    INSERT INTO period_dim (col1, col2, ..., coln)

    SELECT ...

    FROM ...

    WHERE NOT EXISTS

    (

    SELECT 1

    FROM dbo.period_dim WITH (HOLDLOCK)

    WHERE years =...

  • RE: Are table hints a sub-type of query hints?

    Rowles (2/14/2012)


    A table hint would be used in a T-SQL query. So table hints would then be a sub-type of query hint, right?

    I'm not sure I would agree. ...

  • RE: Index

    shah.simmy (2/15/2012)


    my table has 1 primary clustered key and 2 non clustered key.Now i want to rebuild cluster key,do i need to drop non clustered keys and rebuild ,or juts...

  • RE: locking in sql server

    R.P.Rozema (2/16/2012)


    My guess would be they were asking for sp_getapplock (link).

    You beat me to it 🙂

  • RE: sum on specific column

    sharon-472085 (2/16/2012)


    without using sum() function ,without loop, without cursor ,without using any other temp table or column.

    A bit of a cheat, but:

    SELECT

    result =

    ...

  • RE: sum on specific column

    Stewart "Arturius" Campbell (2/16/2012)


    will this help?

    This is an unreliable and unsupported construct, and should not be used or recommended:

    CREATE TABLE #test (col1 tinyint, col2 char(5));

    INSERT #test (col1)

    VALUES (1),(2),(3),(7),(8);

    DECLARE @sum...

  • RE: T-SQL Performance 1

    It is certainly very good practice to match data types, but that is not the only way to obtain a seek here (assuming the default collation is a Windows one...

Viewing 15 posts - 736 through 750 (of 8,416 total)