查詢SQL SERVER 資料庫版本

2021-06-07 17:39:37 字數 482 閱讀 1456

select substring(cast(serverproperty('productversion')as nvarchar(128)),1,charindex('.',cast(serverproperty('productversion')as nvarchar(128)),1)-1)

8 對應 sql server 2000

9 對應 sql server 2005

10 對應 sql server 2008

11 對應 sql server 2012

select serverproperty('engineedition')

2  標準版本(standard)或工作組版本(workgroup)

3 企業版本(enterprise)或者企業評估版本(enterprise evaluation)

4 express版本

SQL Server資料庫查詢

開啟我們的sql server資料庫,找到要查詢的資料庫表,右鍵單擊然後選擇新建查詢,select 選擇我們要查詢的表sys academe學院表 聯合 sys class.classname班級表的班級名稱和sys grade.gradename年級表的年級編號來查詢出資料。下面是查詢的 sele...

SQL Server 跨資料庫查詢

語句 select from 資料庫a.dbo.表a a,資料庫b.dbo.表b b where a.field b.field dbo 可以省略 如 select from 資料庫a.表a a,資料庫b.表b b where a.field b.field sqlserver資料庫 這句是對映乙個...

資料庫分頁查詢(sql server)

程式如下 alter proc pageing pageindex int,頁索引 pagesize int 每頁幾條 asselect empno,ename,job,isnull mgr,0 sal,isnull hiredate,getdate isnull comm,0 isnull dep...