SQL Server 2019下载及安装详细教程

Posted 普通网友

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SQL Server 2019下载及安装详细教程相关的知识,希望对你有一定的参考价值。

SQL Server 2019下载及安装详细教程

  1. 下载安装SQLServer

一、下载安装SQLServer

1、点击链接进入下载 下载地址
2、下载完成之后,找到下载的文件夹中名为“SQLServer2019-SSEI-Dev.exe”的文件,鼠标双击文件 或 鼠标右键 以管理员身份运行

2.1、选择自定义安装

2.2、选择语言和安装位置

我选择的是D盘 D:Program FilesSQLServer,你可以根据自己电脑选择合适的安装位置。

2.3、然后点击安装

2.4、正在下载过程中

2.5、下载成功之后会出现如下界面

2.6、选择“安装” 选择“全新的SQLServer 独立安装或向现有安装添加功能”

2.7、选择可用的版本 Developer, 点击下一步。

2.8、许可条款 勾选“我同意” ,点击下一步。

2.9、更新选择

2.10、安装下载中

2.11、执行完毕后,点击下一步

2.12、点击全选,然后再把机器学习服务(数据库)中的“R”和“Python”以及“Java”不勾选,点击下一步。

2.13、然后选择默认实例,点击下一步

2.14、点击下一步

2.15、点击下一步

2.16、选择混合模式、设置账户密码和选择当前用户,点击下一步

2.17、然后选择表格模式,还是要点击添加当前用户,点击下一步

2.18、选择端口号可以自定义(推荐默认不要修改)点击下一步


点击下一步

点击“添加当前用户”,点击下一步。

点击下一步

点击接收

点击安装


安装过程中

安装完成

???Sql Server???SQL SERVER ????????????

?????????int   with   ??????   serve   span   ??????   inner   --   blog   

??????:???Sql Server???SQL SERVER ????????????

??????SQL SERVER 2005?????????????????????????????????????????????SQL SERVER 2005???????????????CTE?????????????????????CTE?????????????????????

??????CTE??????????????????Common Table Expression ???SQL SERVER 2005????????????????????????????????????

#??????????????????

1???sql

 1 Create table GroupInfo([Id] int,[GroupName] nvarchar(50),[ParentGroupId] int)
 2 
 3 Insert GroupInfo
 4 
 5 select 0,??????????????????,null union all
 6 
 7 select 1,??????????????????,0 union all
 8 select 2,??????????????????,1 union all
 9 select 3,??????????????????,1 union all
10 select 4,????????????????????????,2 union all
11 select 5,????????????????????????,2 union all
12 select 6,????????????????????????,3 union all
13 select 7,????????????????????????,3 union all
14 
15 select 8, ???????????????,0 union all
16 select 9, ?????????????????????,8 union all
17 select 10,????????????????????????,8 union all
18 select 11,???????????????????????????,9 union all
19 select 12,???????????????????????????,9 union all
20 select 13,??????????????????????????????,10 union all
21 select 14,??????????????????????????????,10 

2????????????

 ????????????

#????????????Demo

1???????????????????????????????????????????????????,???????????????????????????

 1 --????????????????????????????????????????????????
 2 with
 3 CTE
 4 as
 5 (
 6     select * from GroupInfo where Id=1
 7     union all
 8     select G.* from CTE inner join GroupInfo as G
 9     on CTE.Id=G.ParentGroupId
10 )
11 select * from CTE order by Id

 

 1 --????????????????????????????????????????????????
 2 with
 3 CTE
 4 as
 5 (
 6     select * from GroupInfo where Id=14
 7     union all
 8     select G.* from CTE inner join GroupInfo as G
 9     on CTE.ParentGroupId=G.Id
10 )
11 select * from CTE order by Id

2?????????????????????

 1 --??????????????????
 2 with
 3 CTE
 4 as
 5 (
 6     select Id,GroupName,ParentGroupId,GroupPath=CAST( GroupName as nvarchar(max)) from GroupInfo where Id=1
 7     union all
 8     select G.*,CAST(CTE.GroupPath+???//???+G.GroupName as nvarchar(max)) as GroupPath from CTE 
 9     inner join GroupInfo as G
10     on CTE.Id=G.ParentGroupId
11 )
12 select * from CTE

????????????

 3?????????????????????????????????????????????????????????

 1 --??????id????????????????????????????????????sort??????????????????sort??????????????????????????????????????????????????????
 2 WITH    
 3 CTE
 4 AS 
 5 ( 
 6     SELECT * ,CAST(RIGHT(???000??? + CAST([Id] AS VARCHAR), 3) AS VARCHAR(MAX)) AS sort FROM GroupInfo
 7     WHERE ParentGroupId = 0
 8     UNION ALL
 9     SELECT   GroupInfo.* ,CAST(sort + RIGHT(???000??? + CAST(GroupInfo.[Id] AS VARCHAR),3) AS VARCHAR(MAX)) AS sort
10     FROM CTE
11     INNER JOIN GroupInfo ON CTE.Id = GroupInfo.ParentGroupId
12 )
13 SELECT * FROM CTE ORDER BY sort 

 ????????????

4?????????????????????????????????????????????????????????

1 --??????????????????
2 WITH CTE AS (
3     SELECT *,1 AS [Level] FROM GroupInfo WHERE ParentGroupId=0
4     UNION ALL
5     SELECT G.*,CTE.Level+1 FROM GroupInfo as G 
6     JOIN CTE ON CTE.Id =G.ParentGroupId
7 )
8 SELECT * FROM CTE

 ????????????

 

以上是关于SQL Server 2019下载及安装详细教程的主要内容,如果未能解决你的问题,请参考以下文章

最新最详细SQL Server 2019 安装教程

❤️最新版数据库SQL Server 2019下载安装详细教程❤️

SQL Server 2008 R2 超详细安装图文教程及问题解决

SQL server 2019 安装教程

SQL server 2019 安装教程

SQL Server2019(Developer版)免费下载安装教程