Forum Replies Created

Viewing 15 posts - 181 through 195 (of 455 total)

  • RE: Truncate

    Good question, but the answer isn't quite right.

    You cannot use TRUNCATE TABLE on tables that are referenced by a FOREIGN KEY constraint UNLESS that table has a foreign key that...

  • RE: Dynamic Query

    Hugo Kornelis (9/24/2013)


    So why does the question use dynamic SQL? If the focus is on how different kinds of comments relate, why not simply use:

    -- /* select 'Samith' name

    */...

  • RE: Dynamic Query

    Mike Dougherty-384281 (9/24/2013)


    ...

    These subtleties of line-commented block-comment and comments-with-comments defeats the whole purpose of comments: to clarify what should be already readable & well-written code.

    ...

    Clarification is not the entire...

  • RE: Disable [guest] database user in [msdb] database

    So if you don't need the features that rely on guest access, you can disable it in msdb?

    So the correct answer should be "It depends on the security requirements"?

    The correct...

  • RE: Variable Declaration

    Primo Dang (9/19/2013)


    sknox (9/19/2013)


    (...)

    Consider, for example, the following:

    DECLARE @Start datetime = getdate();

    SELECT * FROM v_SeveralMinutesToExecuteView;

    DECLARE @End datetime = getdate();

    SELECT DATEDIFF(ms,@Start,@End) as TimeToExecute;

    If values were set during parse time, @Start and...

  • RE: Variable Declaration

    raulggonzalez (9/19/2013)


    Thanks for the question.

    Interesting the logical execution of

    declare @word varchar(100) = 'apple'

    in two phases.

    It makes sense, though. It's more efficient to allocate space for objects in one pass...

  • RE: Alter Certificate

    L' Eomot Inversé (9/12/2013)


    Nice question, but it seems odd to refer to the SQL 2005 version of the BOL page for command, when there are perfectly good versions for the...

  • RE: wildcards

    Carlo Romagnano (9/11/2013)


    The correct exceution of the query depends on ansi_warnings

    set ansi_warnings off

    DECLARE @i TABLE( mychar VARCHAR(10));

    INSERT @i VALUES ('Steve'), ('Stephan'), ('Stephanie')

    ...

  • RE: A Hazard of Using the SQL Update Statement

    dwain.c (9/9/2013)


    Excellent feedback Paul! Absolutely nothing in it I could argue with.

    Didn't know about the SQL Connect article (quite interesting) but I did know the syntax wasn't ANSI standard,...

  • RE: CASE vagaries

    david.gwalter (9/8/2013)


    First time I have come across a question with an incorrect answer.

    A little disappointing for a novice like myself.

    I find that even for questions that are well and correctly...

  • RE: Tally Tables

    Hugo Kornelis (9/3/2013)


    sknox (9/3/2013)


    Wow.

    Nobody's mentioned what I consider to be the biggest problem with this question yet.

    You must have overlooked the things already mentioned about ordering by Rune Irvin, Terreador,...

  • RE: Tally Tables

    Wow.

    Nobody's mentioned what I consider to be the biggest problem with this question yet.

    I'm talking about the following two answer choices:

    The first query returns a Tally table and the second...

  • RE: SQL Server Tables

    SQLRNNR (8/27/2013)


    For me, the wording of the question implies that a requirement of a heap be that it is completely devoid of indexes.

    Then you're not thinking in set-based terms.

    The...

  • RE: ALL clause in SQL Server

    sknox (6/18/2013)


    Hugo Kornelis (6/18/2013)


    To my surprise, ANY and ALL are not defined as each others boolean negation. But their two definitions do appear to be completely opposites. So unless I...

  • RE: ALL clause in SQL Server

    Hugo Kornelis (6/18/2013)


    To my surprise, ANY and ALL are not defined as each others boolean negation. But their two definitions do appear to be completely opposites. So unless I am...

Viewing 15 posts - 181 through 195 (of 455 total)