一个简单问题,求SQL判断````在线解决立马给分`````
列名为 aa 下有行数据信息 bb
我在SQL语句select的时候先判断aa字段内数据是否是 bb,如果是则显示出来的内容用 "你好" 来替换掉,哪位人士能帮下我``在线等`````````
问题点数:30、回复次数:8Top
1 楼lxzm1001(*~悠悠蓝星梦~*)回复于 2006-06-04 17:19:59 得分 5
select case aa when 'bb' then '你好' else '' end from tablenameTop
2 楼xeqtr1982(Visual C# .NET)回复于 2006-06-04 17:21:01 得分 10
create table t(aa varchar(10))
insert into t select 'bb'
insert into t select 'cc'
select case aa when 'bb' then '你好' else aa end as aa from t
drop table tTop
3 楼lxzm1001(*~悠悠蓝星梦~*)回复于 2006-06-04 17:21:10 得分 5
select case aa when 'bb' then '你好' else aa end from tablename
Top
4 楼itblog(Just for wife!)回复于 2006-06-04 17:21:17 得分 3
update 表 set aa=replace(aa,'bb','你好')Top
5 楼itblog(Just for wife!)回复于 2006-06-04 17:26:09 得分 3
select case aa when 'bb' then '你好' else aa end as aa from 表名Top
6 楼xiaomaomi1027(果果)回复于 2006-06-04 17:36:36 得分 3
update <Table_name> set aa='你好' where aa='bb'Top
7 楼RPFly(Fly)回复于 2006-06-04 17:47:28 得分 1
select case aa when 'bb' then '你好' else aa end as aa from tablename
Top
8 楼15916814(Lee.Net)回复于 2006-06-04 17:52:32 得分 0
恩,谢谢大家,结贴`````````Top




