create table #t(id int identity,v image)insert #t select '萨法萨队法'select id,convert(varchar(100),convert(binary(8000),v)) from #t /* id ----------- ---------------------------------------------------------------------------------------------------- 1 萨法萨队法(所影响的行数为 1 行)*/
if object_id('tb')is not null drop table tb go create table tb(ID int identity,test image) insert tb select '表中有一Image字段,存的是一段文字' select ID, cast(cast(test as varbinary(2000)) as varchar(1000))test from tb /* ID test ----------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 表中有一Image字段,存的是一段文字(1 個資料列受到影響) */
create table #t(id int identity,v image)insert #t select '萨法萨队法'select id,convert(varchar(100),convert(binary(8000),v)) from #t
/*
id
----------- ----------------------------------------------------------------------------------------------------
1 萨法萨队法(所影响的行数为 1 行)*/
go
create table tb(ID int identity,test image)
insert tb select '表中有一Image字段,存的是一段文字'
select ID,
cast(cast(test as varbinary(2000)) as varchar(1000))test
from tb
/*
ID test
----------- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 表中有一Image字段,存的是一段文字(1 個資料列受到影響)
*/