天津到台州飞机:求一条sql语句!!

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 04:16:31
有这样一张表,只有一列
a1
b1
c1
a2
b2
c2
a3
b3
c3
……
我要查询出一张表
a1
a2
a3
sql如何写?

select 列名 form 表 where 列名 like %'a'%

select 需显示的列名或*
From 表名
where 列名=a1 OR 列名=a2 OR 列名=a3

select a1,a2,a3 from 表名;

可以在查询分析器里看效果