我们怎样才能使用“Decode” SQLite中的功能? [英] How can we use "Decode" functionality in SQLite?

查看:110
本文介绍了我们怎样才能使用“Decode” SQLite中的功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在SQLite select语句中使用Decode功能。



从我读过的内容来看,SQLite中似乎没有这样的功能。 / p>

什么可以解决方法,以便我们在SQLite中使用类似Decode的东西?

解决方案

Sqlite中没有解码。使用case statement,它是标准的SQL,可以在任何数据库上运行 - 无论如何都更好。


I would like to use "Decode" functionality in SQLite select statement.

From what I have read, it looks like there is no such function in SQLite.

What could be a workaround so that we use something similar to "Decode" in SQLite?

解决方案

There is no decode in Sqlite. Use "case statement instead" it's standard SQL an runs on any DB - which is better anyway.

这篇关于我们怎样才能使用“Decode” SQLite中的功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆