필터 지우기
필터 지우기

When using the database toolbox with PostgreSQL, is there a way to make use of the INSERT ... RETURNING syntax (e.g. to insert new rows and return the newly created PKs?

조회 수: 1 (최근 30일)
As in title:
I am using Matlab 2019b with the database tookbox. I want to execute a statement that will insert multiple new rows into a table, and return the PKs of the newly inserted rows (for a table that uses a serial PK as the default PK value). I have tried using the DB toolbox functions select, execute, and exec with no luck.
  댓글 수: 1
Andrew Janke
Andrew Janke 2020년 1월 31일
I believe that INSERT .. RETURNING is not supported by the Matlab Database Toolbox.
You can come try my "MDBC" Database Toolbox extension, which supports arbitrary result returns from arbitrary SQL statements, and works with INSERT ... RETURNING. https://github.com/apjanke/janklab/blob/c4f108a21856528a801b350e35f33bd78fb2acb9/doc/UserGuide-MDBC.md

댓글을 달려면 로그인하십시오.

답변 (0개)

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by