初用查询分析器遇到的一个查询更新问题
问题是这样的:   
 在   pubs   数据库中,用   select   *   from   titles   ,得到表的所有信息后,表里有这么一行 
                title_id            title            ....................................... 
 16         TC3218                  Onions,   Leeks,   and   Garlic:   Cooking   Secrets   of   the   Mediterranean   
 我用   update   titles   set   title=replace(title, '    ', '空格 ')   where   title_id   =    'tc3218 ' 
 出现如下错误信息:   
 服务器:   消息   8152,级别   16,状态   9,行   1 
 将截断字符串或二进制数据。 
 语句已终止。   
 而我把   title   对应的那条   Onions,   Leeks,   and   Garlic:   Cooking   Secrets   of   the   Mediterranean   复制过来,用 
 select   replace( 'Onions,   Leeks,   and   Garlic:   Cooking   Secrets   of   the   Mediterranean ', '    ', '空格 ')    
 却没报错,而且得到了 
 Onions,空格Leeks,空格and空格Garlic:空格Cooking空格Secrets空格of空格the空格Mediterranean   
 请问这是怎么回事呢? 
 谢谢!!! 
------解决方案--------------------xindekaishi() ( ) 信誉:100    Blog   加为好友  2007-5-5 22:32:47  得分: 0              
 补充一下,我同样用 
 update titles set title=replace(title, '  ', '空格 ') where title_id =  'XXXXXX '  
 处理别的行时又没错误.          
 ----------- 
 不報錯的原因就是,修改後的數據的長度沒有超出表中字段設定的長度。   
 而實際上,並不是所有的都不會報錯,這條語句也會報錯。   
 update titles set title=replace(title, '  ', '空格 ') where title_id =  'PS1372 '   
 其余的,由於長度沒有超出,都不會報錯。