Microsoft Press Configuring sql server 2005 môn 70 - 431 phần 5

A. duy nhất chỉ số B. Clustered index C. nonclustered index D. nước ngoài phím 2. Những chỉ số tùy chọn làm cho SQL Server để tạo ra một chỉ mục với không gian trống trên các lá của chỉ số? A. PAD_INDEX B. FILLFACTOR C. MAXDOP D. IGNORE_DUP_KEY | 356 Chapter 9 Creating Functions Stored Procedures and Triggers SET @ContactType CASE -- Check for employee. WHEN EXISTS SELECT FROM HumanResources . Employee e WHERE e. ContactID @ContactID THEN Employee -- Check for vendor. WHEN EXISTS SELECT FROM Purchasing . VendorContact vc INNER JOIN Person . ContactType ct ON vc. ContactTypeID ct. ContactTypeID WHERE vc. ContactID @ContactID THEN Vendor Contact -- Check for store. WHEN EXISTS SELECT FROM Sales . StoreContact sc INNER JOIN Person . ContactType ct ON sc. ContactTypeID ct. ContactTypeID WHERE sc. ContactID @ContactID THEN Store Contact -- Check for individual consumer. WHEN EXISTS SELECT FROM Sales . Individual i WHERE i. ContactID @ContactID THEN Consumer END Return the information to the caller. IF @ContactID IS NOT NULL BEGIN INSERT @retContactInformation SELECT @ContactID @FirstName @LastName @JobTitle @ContactType END RETURN END SELECT FROM 1 Deterministic vs. Nondeterministic Functions When working with functions it s important to know whether the function you are using is deterministic or nondeterministic. Deterministic functions return for the same set of input values the same value every time you call them. The SQL Server built-in function cos which returns the trigonometric cosine of the specified angle is an example of a deterministic function. In contrast a nondeterministic function can return a different result every time you call it. An example of a nondeterministic function is the SQL Server built-in function GETDATE which returns the current system time and date. SQL Server also considers a function nondeterministic if the Lesson 1 Implementing Functions 357 function calls a nondeterministic function or if the function calls an extended stored procedure. Whether a function is deterministic or not also determines whether you can build an index on the results the function returns and whether you can define a clustered index on a view that references the function. If .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.