1、SQL SERVER 的自定义函数能返回image字段吗?2、select max(sl) ,tp from table1 group by tp
 其中图片是image字段,上面语句的功能该怎么写,如何实现

解决方案 »

  1.   

    不能 因为显示出来的都是2进制代码
    只有外部用字节流读出来 才可以作为image显示
      

  2.   

    1 SQL   SERVER   的自定义函数能返回image字段吗? 
    --
    image 数据类型对返回值无效。2、select   max(sl),tp  from  table1  group  by  tp 
      其中图片是image字段,上面语句的功能该怎么写,如何实现
    你想实现什么?通过函数不能返回
      

  3.   

    1   SQL       SERVER       的自定义函数能返回image字段吗?   
    -- 
    可以是 SQL Server 支持的任何标量数据类型(text、ntext、image 和 timestamp 除外
    2、select       max(sl),tp     from     table1     group     by     tp   
        其中图片是image字段,上面语句的功能该怎么写,如何实现 
    ------------
    declare @t table(t text)insert @t select 'adsfasdf'
    select max(datalength(t)) from @t