
SQL
cathyspring
这个作者很懒,什么都没留下…
展开
-
SQL cast、round函数及numeric类型实例
CAST(cast(round(a.backup_size/1024/1024,2) as numeric(5,2)) AS VARCHAR)+'MB' as backupsize,round函数:用于把数值字段舍为指定位数round(a.backup_size/1024/1024,2)即把a.backup_size/1024/1024的结果,保留2位小数cast函数:用于将round返回值,转换...原创 2018-04-11 16:19:03 · 7043 阅读 · 0 评论 -
SQL Server 的xp_cmdshell和bcp使用
启用 xp_cmdshell 1: sp_configure 'show advanced options',1 2: reconfigure 3: GO 4: 5: sp_configure 'xp_cmdshell',1 6: reconfigure 7: go 8: BCP测试 1: 2: --建立文件夹 3: DECLARE @CmdLine ...转载 2018-04-13 15:36:45 · 2183 阅读 · 0 评论