select SP_COMP.id as cid,SP_COMP.CHR_NAME,SP_MESSAGE.id as mid,SP_MESSAGE.SP_TITLE_CHR,SP_MESSAGE.SP_RESUME_TXT from SP_COMP join SP_MESSAGE on SP_COMP.ID=SP_MESSAGE.SP_COMPID_INT
where SP_COMP.isreg=1 and chr_net like '%qqq%'
where SP_COMP.isreg=1 and chr_net like '%qqq%'
和它所对应的SP_MESSAGE表中的一条记录
如果SP_MESSAGE中有多条只显示一条
如果一条没有就显示Null
where SP_COMP.isreg=1 and chr_net like '%qqq%'
不能以 DISTINCT 方式选择 text、ntext 或 image 数据类型。不行呀