Home > Database > Mysql Tutorial > sql数字转换string字符型

sql数字转换string字符型

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:49:00
Original
1899 people have browsed it

由于sql中没有像vb一样的cstr或php中的string来强制转换,我们自定了一个函数。

 代码如下 复制代码

CREATE FUNCTION [dbo].[Cstr]
(
    @Value SQL_VARIANT
 )
RETURNS NVARCHAR(MAX)
AS
BEGIN
    RETURN ISNULL(CAST(@Value AS NVARCHAR(MAX)), '')
END

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template