Questions tagged «scalar-subquery»

3
带有嵌套联接的PostgreSQL 9.2 row_to_json()
我正在尝试使用row_to_json()PostgreSQL 9.2中添加的功能将查询结果映射到JSON 。 我在找出将嵌套行表示为嵌套对象(1:1关系)的最佳方式时遇到麻烦 这是我尝试过的内容(设置代码:表格,示例数据和查询): -- some test tables to start out with: create table role_duties ( id serial primary key, name varchar ); create table user_roles ( id serial primary key, name varchar, description varchar, duty_id int, foreign key (duty_id) references role_duties(id) ); create table users ( id serial …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.