p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning T-SQL with Microsoft SQL Server 2005 and 2008 ISBN: 978-0-470-25703-6 (http://p2p.wrox.com/forumdisplay.php?f=433)
-   -   Term "type" on p. 121 (http://p2p.wrox.com/showthread.php?t=78644)

member4953 March 22nd, 2010 11:26 AM

Term "type" on p. 121
In the first gray box at the top of page 121 what does the apparent reserved word "type" mean? Also, what does the following parenthetical expression ["(N'U')"] mean?

There is no entry for "type" in the index, and the help section of SQL 2005 does not address this usage that I could find.


Paul_Turley March 22nd, 2010 12:31 PM

The type column indicates the type of object referenced in the sys.objects table. In the example, U is a user-created table. The object types are documented in Books On Line at http://msdn.microsoft.com/en-us/library/ms190324.aspx

Using the letter N before a string value is a common convention in T-SQL to cast the value to a Unicode compatible data type (such as nChar or nVarChar). You'll typically see this in script generated in SSMS.

All times are GMT -4. The time now is 05:21 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.