Foreign Key Fun

  • TomThomson

    SSC Guru

    Points: 104773

    Comments posted to this topic are about the item Foreign Key Fun


  • Revenant


    Points: 42467

    Thanks, Tom - a great question, as I come to expect from you.

    I till hope you will appear in Redmond, which would give me an opportunity to take you to the Bellevue whiskey bar, as I promised some time before...

  • patricklambin

    SSCrazy Eights

    Points: 9964

    Thanks for this good question.

    I found the good choices only because I have "spied" a debate during the last Paris SQL Server Staturdays 2014 about this kind of topic.

    When I dared to ask why it is possible to create a temp table with a foreign key without an error , nobody knew the answer. The table has been created because it was existing and useable without no problem. No explanation.. Bad luck for me ( I am appreciating clear explanations because it is easier to remember the problem ) but I did not forget this problem.

  • Neil Burton


    Points: 22228

    Dammit! Didn't see select three!!!!!

    On two occasions I have been asked, "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
    β€”Charles Babbage, Passages from the Life of a Philosopher

    How to post a question to get the most help

  • Koen Verbeeck

    SSC Guru

    Points: 258965

    Awesome question Tom, well done.

    Need an answer? No, you need a question
    My blog at
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Toreador


    Points: 11257

    Wish I'd noticed who wrote the question before I answered! I'd have ignored the obvious and looked a bit closer for the 'trick' πŸ˜‰

  • call.copse


    Points: 17206

    Interesting and informative, also wholly correct AFAICS πŸ™‚ thanks.

  • Ed Wagner

    SSC Guru

    Points: 286982

    Nice question, Tom. Good, clear and logical thought, just like I'd expect from you. I learned something new today, as I've never seen the skip before. Thanks.

  • RLilj33


    Points: 2153

    Thanks for the question. I wasn't aware of this restriction, so I learned something new today.

    P.S. As a data professional, I prefer to use the term 'junque'. πŸ˜›

  • SQL_Hunt


    Points: 33450

    I found the question to be little confusing as it asked to know if temp tables were created. Could have been slightly different. However I hot the right options.


  • Eirikur Eiriksson

    SSC Guru

    Points: 182440

    Elementary my dear Dr. Watson Mr. Thomson


  • Mark Cowne

    One Orange Chip

    Points: 26754

    Great question, got it wrong but definitely learned something new.


    Deja View - The strange feeling that somewhere, sometime you've optimised this query before

    How to get the best help on a forum
  • akljfhnlaflkj

    SSC Guru

    Points: 76202

    Thanks for the question. Learned something about temp tables.


    SSC Guru

    Points: 281243

    Ed Wagner (3/6/2015)

    Nice question, Tom. Good, clear and logical thought, just like I'd expect from you. I learned something new today, as I've never seen the skip before. Thanks.


    Jason...AKA CirqueDeSQLeil
    I have given a name to my pain...MCM SQL Server, MVP
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • stephen.long.1


    Points: 2577

    Fantastic question, Tom, and very interesting, as I expected when I saw that you wrote it. I learned something today (which is the whole reason for QotD).

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in to reply to this topic. Login to reply