7m篮球比分即时比分app: 如何在PostgreSql數據中SELECT的時候A字段如果內容空就返回B字段的內容?

0
PostgreSQL 數據庫 32188 次瀏覽

篮球比分188直播 www.703192.live    content表有一個body字段和clean_body字段,單獨獲取body很容易用,select body from content就可以了,最近業務需要擴展了一個clean_body字段,用來存放body清洗后的數據。現在業務邏輯就是在clean_body中內容為空時,自動到body中去獲取數據。

   如果直接將兩個字段的內容都讀出(select body,clean_body from content)然后在代碼中自己判斷也是可以的,這樣做總覺得怪怪的,如果在數據庫一層就可以做到的話是最完美的!

請盡量讓自己的答案能夠對別人有幫助

14個答案

默認排序按投票排序
0

This is a great content. Thank you very much.

<a href="https://ufaz88movie.com/Vagabond-2020-%E0%B9%80%E0%B8%88%E0%B8%B2%E0%B8%B0%E0%B9%81%E0%B8%9C%E0%B8%99%E0%B8%A5%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%84%E0%B8%A3%E0%B8%B7%E0%B8%AD%E0%B8%82%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B8%99%E0%B8%A3%E0%B8%81">???? hd</a>

 

0

Thanks to you, I've learned a lot about software. Thank you very much.

bubble shooter  G Switch 3

0

It really is a bit strange but useful and informative. Thanks and please find time to check these:

roofing companies bradenton
roof repair st. petersburg
roof repair bradenton

And this as well:

pool enclosures north port
pool enclosures sarasota 

0

It is important to keep the cleaned data of the body. For roofing solutions check these:

screen enclosures sarasota

screen enclosures northport

screen enclosures venice

pool enclosures bradenton

0

用來存放body清洗后的福彩3D 數據。現在業務 上???邏輯就是在clean_body中內容為空時,自動到body中去獲取北京快3數據。  

0

您的文章內容很棒。 感謝您分享好的信息.????????? slotxo

0

When students seek Psychology Coursework Writing Services, they are assured of receiving Best Psychology Writing Services and Psychology Research Paper Writing Services that meets all their writing needs. 

 

-1

Thanks for Nice and Informative Post. This article is really contains lot more information about This Topic.Thanks for Nice and Informative Post. This article is really contains lot more information about This Topic.

gmail sign up

-1

瀏覽器調試網頁chrome://inspect/#devic 

-1

Welcome back to one of the world’s most intense mazes. Will you reach each one of the checkpoints in this epic action game? You’ll need to watch out for everything from moving platforms to bottomless pits! super smash flash 2

-1

This is perfect but I chose this platform to ask one question about how do you use an IF function for a blank cell? Cheap Coursework Help UK

-1

Students usually look for University term paper writing service when they cannot tackle their assigned project on their own. They prefer taking help with University case study writing service for subjects that are really tough and cannot be managed by them. That University homework writing service can be in the form of their elders or classmates or previous project samples. But there is certainly a huge difference between a professional GlobalResearchService and an amateur, a sample paper and a fair project submission.

-1

我對你在文章中提供的信息印象非常深刻。 我必須說你的整個故事都非常不知所措。 現在在網上獲得如此高質量的信息并不容易。 我期待在這里待很長時間。

192.168.l.l

2

你用下面這個SQL語句試試看:

SELECT (CASE WHEN (clean_body IS NULL OR clean_body = '') THEN body ELSE clean_body END) as body FROM content;

 

相似問題

相關經驗

相關資訊

相關文檔

{ganrao} 山东十一选五必中 安徽体彩11选5手机版 安徽11选5前3直 股票行情今天大盘8月15 吉林快三微信群拉 东方6+1开奖规则 深圳风采中奖几率大 广西11选5人工预测 幸运农场实时预测 期货配资网 吉林快三最新遗漏 极速赛车彩票平台 广西11选五走势图手机版 四川快乐12一定牛走势图 四川金七乐基本走势图 黑龙江22选5预测