The Extra Table

  • Kendra.Little

    Old Hand

    Points: 323

    Comments posted to this topic are about the item The Extra Table

  • HappyGeek

    SSCoach

    Points: 18684

    Nice simple and basic question and a good reminder to boot, thanks Kendra.

    ...

  • SADSAC

    SSCrazy

    Points: 2065

    Nice question, thanks Kendra
    Had to field something similar fairly recently.
    A developer wrote all his tables, views & procs im model, but could not understand why new databases contained the same code (he did not realise model was a system db)

  • Stewart "Arturius" Campbell

    SSC Guru

    Points: 71858

    I like this question.
    Thanks, Kendra

    ____________________________________________
    Space, the final frontier? not any more...
    All limits henceforth are self-imposed.
    “libera tute vulgaris ex”

  • Sean Lange

    SSC Guru

    Points: 286536

    Nice and straight forward. 22% of the people got this wrong at the time of my comment. Kind of surprised by that.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • webrunner

    SSC-Dedicated

    Points: 30305

    Thanks for this informative question.

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • t.ovod-everett

    Ten Centuries

    Points: 1389

    I made a cool discovery recently related to this.  A user cannot both be the owner of a database and be a db_owner within the database - SQL Server won't let you.  Except they can, if you're sneaky!

    Grant the user db_owner within model.  Then grant the user dbcreator at the server level.  Then have the user create a new database.  They will be the owner of the database as well as being db_owner within the database.  Then revoke db_owner for the user within model.  Voila!

    Not that useful, unless you're dealing with a vendor installation procedure that uses account A to set up a database for use by account B and assumes that account A has sysadmin.  After account A creates the new database, it then sets the owner on the database to account B and then promptly complains that it can't create tables using account A.  The above trick let me avoid granting sysadmin to account A.

  • Jeff Moden

    SSC Guru

    Points: 996830

    Sean Lange - Tuesday, March 5, 2019 7:06 AM

    Nice and straight forward. 22% of the people got this wrong at the time of my comment. Kind of surprised by that.

    I'm a bit gob-smacked that 98 out of 499 people (20%) have gotten this one wrong.  I believe I'm going to add it to the ice-breaker-become-litmus_strip questions that I ask on interviews along with the infamous "How to you get the current date and time using T-SQL" question.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "If "pre-optimization" is the root of all evil, then what does the resulting no optimization lead to?"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Sean Lange

    SSC Guru

    Points: 286536

    Jeff Moden - Wednesday, March 6, 2019 2:09 PM

    Sean Lange - Tuesday, March 5, 2019 7:06 AM

    Nice and straight forward. 22% of the people got this wrong at the time of my comment. Kind of surprised by that.

    I'm a bit gob-smacked that 98 out of 499 people (20%) have gotten this one wrong.  I believe I'm going to add it to the ice-breaker-become-litmus_strip questions that I ask on interviews along with the infamous "How to you get the current date and time using T-SQL" question.

    And 7% of them think it is most likely an undocumented artifact from MS. Really??? Of the other absurd yet possible responses that one blows me away.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • x

    SSC-Insane

    Points: 23578

    Sean Lange - Wednesday, March 6, 2019 2:27 PM

    Jeff Moden - Wednesday, March 6, 2019 2:09 PM

    Sean Lange - Tuesday, March 5, 2019 7:06 AM

    Nice and straight forward. 22% of the people got this wrong at the time of my comment. Kind of surprised by that.

    I'm a bit gob-smacked that 98 out of 499 people (20%) have gotten this one wrong.  I believe I'm going to add it to the ice-breaker-become-litmus_strip questions that I ask on interviews along with the infamous "How to you get the current date and time using T-SQL" question.

    And 7% of them think it is most likely an undocumented artifact from MS. Really??? Of the other absurd yet possible responses that one blows me away.

    I'd buy it. Learning SQL Server is literally a pursuit of trivia.

    Additionally I'm finding more often that due to the ease of entry with SQL Server, its often the first "programming" environment that people encounter.

  • Jeff Moden

    SSC Guru

    Points: 996830

    patrickmcginnis59 10839 - Wednesday, March 6, 2019 2:52 PM

    Sean Lange - Wednesday, March 6, 2019 2:27 PM

    Jeff Moden - Wednesday, March 6, 2019 2:09 PM

    Sean Lange - Tuesday, March 5, 2019 7:06 AM

    Nice and straight forward. 22% of the people got this wrong at the time of my comment. Kind of surprised by that.

    I'm a bit gob-smacked that 98 out of 499 people (20%) have gotten this one wrong.  I believe I'm going to add it to the ice-breaker-become-litmus_strip questions that I ask on interviews along with the infamous "How to you get the current date and time using T-SQL" question.

    And 7% of them think it is most likely an undocumented artifact from MS. Really??? Of the other absurd yet possible responses that one blows me away.

    I'd buy it. Learning SQL Server is literally a pursuit of trivia.

    Additionally I'm finding more often that due to the ease of entry with SQL Server, its often the first "programming" environment that people encounter.

    True dat!

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "If "pre-optimization" is the root of all evil, then what does the resulting no optimization lead to?"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • David Burrows

    SSC Guru

    Points: 64736

    patrickmcginnis59 10839 - Wednesday, March 6, 2019 2:52 PM

    Sean Lange - Wednesday, March 6, 2019 2:27 PM

    Jeff Moden - Wednesday, March 6, 2019 2:09 PM

    Sean Lange - Tuesday, March 5, 2019 7:06 AM

    Nice and straight forward. 22% of the people got this wrong at the time of my comment. Kind of surprised by that.

    I'm a bit gob-smacked that 98 out of 499 people (20%) have gotten this one wrong.  I believe I'm going to add it to the ice-breaker-become-litmus_strip questions that I ask on interviews along with the infamous "How to you get the current date and time using T-SQL" question.

    And 7% of them think it is most likely an undocumented artifact from MS. Really??? Of the other absurd yet possible responses that one blows me away.

    I'd buy it. Learning SQL Server is literally a pursuit of trivia.

    Additionally I'm finding more often that due to the ease of entry with SQL Server, its often the first "programming" environment that people encounter.

    Careful! You'll be calling DBAs programmers next :Whistling: :laugh:

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Jeff Moden

    SSC Guru

    Points: 996830

    David Burrows - Thursday, March 7, 2019 2:14 AM

    patrickmcginnis59 10839 - Wednesday, March 6, 2019 2:52 PM

    Sean Lange - Wednesday, March 6, 2019 2:27 PM

    Jeff Moden - Wednesday, March 6, 2019 2:09 PM

    Sean Lange - Tuesday, March 5, 2019 7:06 AM

    Nice and straight forward. 22% of the people got this wrong at the time of my comment. Kind of surprised by that.

    I'm a bit gob-smacked that 98 out of 499 people (20%) have gotten this one wrong.  I believe I'm going to add it to the ice-breaker-become-litmus_strip questions that I ask on interviews along with the infamous "How to you get the current date and time using T-SQL" question.

    And 7% of them think it is most likely an undocumented artifact from MS. Really??? Of the other absurd yet possible responses that one blows me away.

    I'd buy it. Learning SQL Server is literally a pursuit of trivia.

    Additionally I'm finding more often that due to the ease of entry with SQL Server, its often the first "programming" environment that people encounter.

    Careful! You'll be calling DBAs programmers next :Whistling: :laugh:

    What the heck... a lot of people call programmers DBAs now.  😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "If "pre-optimization" is the root of all evil, then what does the resulting no optimization lead to?"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • David Burrows

    SSC Guru

    Points: 64736

    Jeff Moden - Thursday, March 7, 2019 6:53 AM

    David Burrows - Thursday, March 7, 2019 2:14 AM

    patrickmcginnis59 10839 - Wednesday, March 6, 2019 2:52 PM

    Sean Lange - Wednesday, March 6, 2019 2:27 PM

    Jeff Moden - Wednesday, March 6, 2019 2:09 PM

    Sean Lange - Tuesday, March 5, 2019 7:06 AM

    Nice and straight forward. 22% of the people got this wrong at the time of my comment. Kind of surprised by that.

    I'm a bit gob-smacked that 98 out of 499 people (20%) have gotten this one wrong.  I believe I'm going to add it to the ice-breaker-become-litmus_strip questions that I ask on interviews along with the infamous "How to you get the current date and time using T-SQL" question.

    And 7% of them think it is most likely an undocumented artifact from MS. Really??? Of the other absurd yet possible responses that one blows me away.

    I'd buy it. Learning SQL Server is literally a pursuit of trivia.

    Additionally I'm finding more often that due to the ease of entry with SQL Server, its often the first "programming" environment that people encounter.

    Careful! You'll be calling DBAs programmers next :Whistling: :laugh:

    What the heck... a lot of people call programmers DBAs now.  😀

    LOL :hehe:

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Sean Lange

    SSC Guru

    Points: 286536

    Jeff Moden - Thursday, March 7, 2019 6:53 AM

    David Burrows - Thursday, March 7, 2019 2:14 AM

    Careful! You'll be calling DBAs programmers next :Whistling: :laugh:

    What the heck... a lot of people call programmers DBAs now.  😀

    ROFL!!!

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

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

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