作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
<分区>
我有一份参加锦标赛的球员名单。
tournament=> SELECT * FROM players;
name | player_id
-------------------+-----------
Twilight Sparkle | 9
Fluttershy | 10
Applejack | 11
Pinkie Pie | 12
Rarity | 13
Rainbow Dash | 14
Princess Celestia | 15
Princess Luna | 16
(8 rows)
这就是我希望列表的样子。我如何要求 postgreSQL 做到这一点?
name1 | id1 | name2 | id2
-------------------+---------+-------------------+-------
Twilight Sparkle | 9 | Fluttershy | 10
Applejack | 11 | Pinkie Pie | 12
Rarity | 13 | Rainbow Dash | 14
Princess Celestia | 15 | Princess Luna | 16
(4 pairs)
我是一名优秀的程序员,十分优秀!