我在access 2007中使用switch语句,我想知道如何指定默认值
select switch ( MyCol = 1,'Value is One',MyCol = 2,'Value is Two' ) from MyTable
谢谢
解决方法
SELECT Switch(MyTable.[MyCol]='1','Terrestrial',MyTable.[MyCol]='2','Value is two',MyTable.[MyCol]='3','Value is three',True,'Error') AS ColumnName FROM MyTable;