p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Beginning T-SQL with Microsoft SQL Server 2005 and 2008 ISBN: 978-0-470-25703-6 (http://p2p.wrox.com/book-beginning-t-sql-microsoft-sql-server-2005-2008-isbn-978-0-470-25703-6-433/)
-   -   Term "type" on p. 121 (http://p2p.wrox.com/book-beginning-t-sql-microsoft-sql-server-2005-2008-isbn-978-0-470-25703-6/78644-term-type-p-121-a.html)

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.

Thanks.

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 02:48 AM.

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