The Extra Table

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

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

    ...

  • 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)

  • I like this question.
    Thanks, Kendra

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

  • 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/

  • 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

  • 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.

  • 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.


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

  • 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/

  • 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.

  • 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.


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

  • 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.

  • 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.


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

  • 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.

  • 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 14 (of 14 total)

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