
SqlServer
移山小斗车
为人低调,喜欢写代码,打dota
展开
-
从SqlServer中导出完整的表说明
关键的Sql语句关键Sql语句之查询当前库的用户表select * from sys.tables关键Sql语句之查询当前表的所有字段详细信息SELECT 表名 = case when a.colorder=1 then d.name else '' end, 表说明 = case when a.colorder=1 then isnull(f.value,原创 2016-11-23 15:07:09 · 2646 阅读 · 0 评论 -
SqlServer 给字段和表加注释
语法 sp_addextendedproperty [ @name = ] { 'property_name' } [ , [ @value = ] { 'value' } [ , [ @level0type = ] { 'level0_object_type' } , [ @l转载 2016-10-12 15:27:43 · 2025 阅读 · 0 评论 -
SQL中的Update Select
最常用的update语法是:12UPDATE TABLE_NAMESET column_name1 = VALUE WHRER column_name2 = VALUE如果我的更新值Value是从一条select语句拿出来,而且有很多列的话,用这种语法就很麻烦第一,要select出来放在临时变量上,有很多个很难保存。转载 2017-05-11 13:17:26 · 2837 阅读 · 0 评论 -
SqlServer 2008R2 分页查询语句写法
SqlServer 2008R2分页新写法--以前的写法-必须借助row_number()函数来获取行的序列号Select *from ( select ROW_NUMBER() over(order by name asc) as __tempId, * From (select t.* from student t)as a)as aWhere a.__原创 2017-06-14 09:29:51 · 5102 阅读 · 1 评论 -
Sql Server 配置IP地址连接
SqlServer 配置Ip连接SqlServer 一般安装好后,服务器的名称一般是这种形式:DESKTOP-BQR74E0\SQLEXPRESS ,但是往往我们是需要用Ip地址进行连接。操作方式: 1,打开Sql Server Configuration Manager -> SQL Server 网络配置 -> SQLEXPRESS 的协议 -> TCP/IP 启用,同时右键设置 IPALL原创 2017-11-22 15:50:02 · 16902 阅读 · 0 评论 -
Host文件影响sqlserver 远程用户连接
本地程序的ConnectString 中 DataSource配置为计算机名,然后采用当前运行程序的用户身份进行验证就好了本地系统的host文件,计算机名对应上IP地址,因为计算机名需要域名服务器解析,当没有域名服务器的时候,就需要host来做了主要也是公司里面没有域名服务器...原创 2018-05-25 15:50:25 · 1364 阅读 · 0 评论