开发者

How to format Oracle SQL query

开发者 https://www.devze.com 2023-01-31 12:07 出处:网络
I have this excursie Write the query, showing prices of all products in one column with the following condition: \"The price [Product Na开发者_如何学JAVAme] is

I have this excursie

Write the query, showing prices of all products in one column with the following condition: "The price [Product Na开发者_如何学JAVAme] is [Price] lv.

The table looks like this

How to format Oracle SQL query


If I understood your question correctly, what you are looking for is the concatenation operator ||

You can produce the product name and price in one column like this

SELECT 'The price of [' || PRODNAME || '] is [' || PRODAJNACENA || '] lv' 
FROM your_table_name;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号