Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>spt_values</code> table is not mentioned in the the SQL Server documentation but it goes back to the Sybase days and there is some <a href="http://infocenter.sybase.com/archive/index.jsp?topic=/com.sybase.help.ase_15.0.sag1/html/sag1/sag126.htm" rel="noreferrer">extremely minimal documentation</a> in the Sybase online docs that can be summed up in this comment:</p> <blockquote> <p>To see how it is used, execute sp_helptext and look at the text for one of the system procedures that references it.</p> </blockquote> <p>In other words, read the code and work it out for yourself. </p> <p>If you poke around the system stored procedures and examine the table data itself, it's fairly clear that the table is used to translate codes into readable strings (among other things). Or as the Sybase documentation linked above puts it, "to convert internal system values [...] into human-readable format"</p> <p>The table is also <a href="https://www.google.com/webhp#q=site:msdn.com+spt_values" rel="noreferrer">sometimes used</a> in code snippets in MSDN blogs - but never in formal documentation - usually as a convenient source of a list of numbers. But as discussed <a href="https://dba.stackexchange.com/questions/11506/why-are-numbers-tables-invaluable">elsewhere</a>, creating your own source of numbers is a safer and more reliable solution than using an undocumented system table. There is even <a href="https://connect.microsoft.com/SQLServer/feedbackdetail/view/258733" rel="noreferrer">a Connect request</a> to provide a 'proper', documented number table in SQL Server itself.</p> <p>Anyway, the table is entirely undocumented so there is no significant value in knowing anything about it, at least from a practical standpoint: the next servicepack or upgrade might change it completely. Intellectual curiosity is something else, of course :-)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload