sql中用LTRIM ( ),RTRIM ( ).分别截断首尾空格,返回字符表达式. 例1: DECLARE @string_to_trim varchar(60)SET @string_to_trim = ' Four spaces are after the period in this sentence. 'SELECT 'BEGIN|' + CHAR(13) + ltrim(rtrim(@string_to_trim))+'|END' 詳見:http://blog.sina.…
镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ 1 code --除去字符串的右边的空格,左边中间的不管 select rtrim(' as d a ') 2 show ------------------------------------------博文的精髓,在技术部分,更在镇场一诗.SqlSever是优秀的语言,值得努力学习.熟悉数据库…