本文介紹了如何從多個表創建視圖?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
我必須從 MS SQL Server 數據庫中的多個表創建視圖,但我無法獲得相同的正確語法.
I have to create a view from more than one table in an MS SQL Server database, but I am not able to get the correct syntax for the same.
推薦答案
您必須提供有關如何從多個表中返回數據的更多信息.通常您使用 JOIN:
You'll have to provide more information about how you are looking to return data from more than one table. Typically you use JOINs:
...其中 fk
代表外鍵",而 pk
代表主鍵"——假設這些約束已經到位.也許您需要改用交叉連接?這是一個 JOIN 的出色視覺表示.
...where fk
stands for "Foreign Key", and pk
stands for "Primary Key" - assuming these constraints are in place. Maybe you need to use a Cross join instead? Here's a great visual representation of JOINs visually.
參考:
- 創建視圖
這篇關于如何從多個表創建視圖?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!