資料連線 DataDirectory 中的作用

2021-09-06 06:27:13 字數 458 閱讀 9873

web.config檔案中的**

"

sqlconn

" connectionstring="

data source=.\sqlexpress;attachdbfilename=|datadirectory|database.mdf;integrated security=true;user instance=true

" providername="

system.data.sqlclient

"/>

datadirectory 是表示資料庫路徑的替換字串。由於無需對完整路徑進行硬編碼,datadirectory 簡化了專案的共享和應用程式的部署。

通過使用 |datadirectory|(包含在如下所示的豎線中),即可具有以下連線字串:

"data source = |datadirectory|\mydb.mdf" 

資料庫內連線 左連線 右連線

1.內連線我們通常用的連線,表表連線只顯示交集資料 2.外連線分左外連線 table1 left outer join on table2 和右外連線table1 right outer join on table2 和全連線 table1 full outer join on table2 2.1...

資料庫 內連線 外連線 左連線

總結 內連線 僅僅顯示匹配的行 外連線 設法顯示不匹配的行,包括左 外 連線 右 外 連線 全 外 連線 左 外 連線 左表的行全顯示 右表不存在匹配時填null 右 外 連線 右表的行全顯示 左表不存在匹配時填null 全 外 連線 左連線和右連線的結果再做合併 union sql ansi的寫法...

資料庫內連線 左連線 右連線 全連線

1.內連線我們通常用的連線,表表連線只顯示交集資料。2.外連線分左外連線 table1 left outer join on table2 右外連線table1 right outer join on table2 全連線table1 full outer join on table2。2.1左外連...