本文介绍了在表格中以正确的格式显示我的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

& lt; pre lang ="sql"& gt; SELECT名称,全名,公司名称,国家/地区,FROM(SELECT全名,公司名称,名称,国家/地区,Row_number()OVER(ORDER BY全名DESC)RowNum FROM( SELECT P.fullname,P.company_name,P.designation,P.country从People AS P内部加入公司AS C ON P.company_id = C.company_id WHERE((P.fullname如``a%'')和)或(C.company_name像``a%'')通过P.fullname,P.company_name,P.designation,P.country等组成的组)t)t1在(0 * 25 + 1)和((2 + 1)*之间的行数25)




这是我的查询
它给了我混乱的格式.
我需要正确的格式.
所有列的全名均为"a%",然后公司名称为"a%".
输出格式应为这种格式
完整的公司名称
aabbc ccccc
abcc sssss
ab sssbshjhsj
ddfdfd aaabbbbaa
eryeyruy aabbbdd
ruhj ahfhff




请Plz朋友在此查询中为我提供帮助.

<pre lang="sql">SELECT designation,fullname,company_name,country, FROM(SELECT fullname,company_name,designation,country, Row_number() OVER (ORDER BY fullname DESC) RowNum FROM (SELECT P.fullname,P.company_name, P.designation, P.country FROM People AS P inner JOIN Company AS C ON P.company_id = C.company_id WHERE ((P.fullname like ''a%'') and )or(C.company_name like ''a% )GROUP BY P.fullname,P.company_name,P.designation,P.country, ) t) t1 WHERE RowNum BETWEEN (0*25+1) AND ((2+1)*25)




this is my query
it is giving me out put in jumbled format.
I need it in proper format.
Full name with ''a%'' all columns and then companyname with ''a%''.
out put should be in this format
FUll name companyname
aabbc ccccc
abcc sssss
ab sssbshjhsj
ddfdfd aaabbbbaa
eryeyruy aabbbdd
ruhj ahfhff




Plz friends help me in this query.

推荐答案


这篇关于在表格中以正确的格式显示我的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 00:30