TAILIEUCHUNG - Microsoft SQL Server 2008 R2 Unleashed- P82

Microsoft SQL Server 2008 R2 Unleashed- P82:SQL Server 2005 provided a number of significant new features and enhancements over what was available in SQL Server 2000. This is not too surprising considering there was a five-year gap between these major SQL Server 2008 is not as much of a quantum leap forward from SQL Server 2005 | 754 CHAPTER 24 Creating and Managing Tables When you look at the definition of the CodeTable table in Object Explorer you see the TableDesc column displayed with the ShortDescription data type as well as the underlying data type varchar 20 . You can use the Object Explorer to create user-defined data types as well. To do so you right-click the User-Defined Data Types node then select Programmability and then select Types. Then you choose the New User-Defined Data Type option and you can create a new user-defined data type through a friendly GUI screen. If you create a user-defined data type in the model database this user-defined data type is created in any newly created database. CLR User-Defined Types SQL Server 2008 continues support for user-defined types UDTs implemented with the Microsoft .NET Framework common language runtime CLR . CLR UDTs enable you to extend the type system of the database and also enable you to define complex structured types. A UDT may be simple or structured and of any degree of complexity. A UDT can encapsulate complex user-defined behaviors. You can use CLR UDTs in all contexts where you can use a system type in SQL Server including in columns in tables in variables in batches in functions or stored procedures as arguments of functions or stored procedures or as return values from functions. A UDT must first be implemented as a managed class or structure in any one of the CLR languages and compiled into a .NET Framework assembly. You can then register it with SQL Server by using the CREATE ASSEMBLY command as in the following example CREATE ASSEMBLY latlong FROM c samplepath After registering the assembly you can create the CLR UDTs by using a variation of the CREATE TYPE command shown previously CREATE TYPE latitude EXTERNAL NAME CREATE TYPE longitude EXTERNAL NAME When a CLR UDT is created you can use it in the definition of tables. The following example shows a table created with the

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.