1.select * from tb2.select left(col ,4) from tb where len(col) > 4
1 SELECT a.name 字段名 FROM syscolumns a left join systypes b on a.xtype=b.xusertype inner join sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties' left join syscomments e on a.cdefault=e.id left join sysproperties g on a.id=g.id and a.colid=g.smallid where d.name='表名'order by a.id,a.colorder 2 SELECT left(a.name,4) FROM syscolumns a left join systypes b on a.xtype=b.xusertype inner join sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties' left join syscomments e on a.cdefault=e.id left join sysproperties g on a.id=g.id and a.colid=g.smallid where d.name='表名' and len(a.name>4 order by a.id,a.colorder
1.select * from tb2.select left(col ,4) from tb where len(col) > 4
1
SELECT a.name 字段名 FROM syscolumns a left join systypes b on a.xtype=b.xusertype
inner join sysobjects d on a.id=d.id
and d.xtype='U' and d.name<>'dtproperties' left join syscomments e on a.cdefault=e.id left join
sysproperties g on a.id=g.id and a.colid=g.smallid where d.name='表名'order by a.id,a.colorder
2
SELECT left(a.name,4) FROM syscolumns a left join systypes b on a.xtype=b.xusertype
inner join sysobjects d on a.id=d.id
and d.xtype='U' and d.name<>'dtproperties' left join syscomments e on a.cdefault=e.id left join
sysproperties g on a.id=g.id and a.colid=g.smallid where d.name='表名' and len(a.name>4 order by a.id,a.colorder