Timeline for answer to Insert into ... values ( SELECT ... FROM ... ) by Mohammed Safeer
Current License: CC BY-SA 4.0
Post Revisions
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 18, 2023 at 15:14 | comment | added | jarlh | BTW, note that tables have columns, not fields. | |
| Dec 18, 2023 at 15:13 | comment | added | jarlh | 1) works with one row or less. (NULL will be inserted if zero rows.) | |
| Aug 31, 2023 at 18:57 | comment | added | Chimdi | @SithijaPiyumanThewaHettige you can do something like: INSERT INTO tablename (col1, col2) SELECT field1, field2 FROM tablename RETURNING col1, col2 The maria db support is from version 10.5.0 You can look at the documentation mariadb.com/kb/en/insertreturning | |
| Feb 13, 2023 at 8:17 | comment | added | Sithija Piyuman Thewa Hettige | i want to use RETURNING with this inorder to return a specific column of the inserted records ? how do i accomplish that @Mohammed Safeer any inputs appreciated ? | |
| Apr 4, 2019 at 4:09 | history | answered | Mohammed Safeer | CC BY-SA 4.0 |