Click here to Skip to main content
15,887,175 members
Home / Discussions / Database
   

Database

 
QuestionTrying to replace local file links with actual file contents Pin
J Snape2-Jul-17 19:53
professionalJ Snape2-Jul-17 19:53 
AnswerRe: Trying to replace local file links with actual file contents Pin
J Snape3-Jul-17 19:51
professionalJ Snape3-Jul-17 19:51 
AnswerRe: Trying to replace local file links with actual file contents Pin
jschell5-Jul-17 6:51
jschell5-Jul-17 6:51 
QuestionHow do I get all the Ids from my last insert in Mysql? Pin
karengsh27-Jun-17 18:05
karengsh27-Jun-17 18:05 
AnswerRe: How do I get all the Ids from my last insert in Mysql? Pin
Richard MacCutchan27-Jun-17 19:54
mveRichard MacCutchan27-Jun-17 19:54 
GeneralRe: How do I get all the Ids from my last insert in Mysql? Pin
karengsh27-Jun-17 21:07
karengsh27-Jun-17 21:07 
GeneralRe: How do I get all the Ids from my last insert in Mysql? Pin
Richard MacCutchan28-Jun-17 8:51
mveRichard MacCutchan28-Jun-17 8:51 
AnswerRe: How do I get all the Ids from my last insert in Mysql? Pin
Richard Deeming27-Jun-17 23:51
mveRichard Deeming27-Jun-17 23:51 
In MS SQL Server, you'd use the OUTPUT clause. Unfortunately, there doesn't seem to be an equivalent for MySQL.

Selecting the top N rows won't work - another user might have inserted rows between your INSERT and SELECT statements. That's why the LAST_INSERT_ID function exists.
MySQL :: MySQL 5.7 Reference Manual :: 27.8.15.3 How to Get the Unique ID for the Last Inserted Row[^]

I suspect you might need to insert the values one at a time, and use LAST_INSERT_ID to retrieve the ID.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: How do I get all the Ids from my last insert in Mysql? Pin
karengsh28-Jun-17 0:36
karengsh28-Jun-17 0:36 
AnswerRe: How do I get all the Ids from my last insert in Mysql? Pin
ZurdoDev28-Jun-17 9:48
professionalZurdoDev28-Jun-17 9:48 
QuestionAccess ComboBox Query Question Pin
Bassam Abdul-Baki27-Jun-17 14:16
professionalBassam Abdul-Baki27-Jun-17 14:16 
QuestionNeed to load bulk Data with some conditions Pin
indian14327-Jun-17 10:14
indian14327-Jun-17 10:14 
AnswerRe: Need to load bulk Data with some conditions Pin
Mycroft Holmes27-Jun-17 19:26
professionalMycroft Holmes27-Jun-17 19:26 
GeneralRe: Need to load bulk Data with some conditions Pin
indian14328-Jun-17 8:14
indian14328-Jun-17 8:14 
GeneralRe: Need to load bulk Data with some conditions Pin
indian14312-Jul-17 7:41
indian14312-Jul-17 7:41 
QuestionORDER BY issue with Interbase XE SQL Server Pin
User 1106097925-Jun-17 2:32
User 1106097925-Jun-17 2:32 
QuestionRe: ORDER BY issue with Interbase XE SQL Server Pin
Eddy Vluggen25-Jun-17 3:06
professionalEddy Vluggen25-Jun-17 3:06 
GeneralRe: ORDER BY issue with Interbase XE SQL Server Pin
User 1106097925-Jun-17 3:24
User 1106097925-Jun-17 3:24 
GeneralRe: ORDER BY issue with Interbase XE SQL Server Pin
Eddy Vluggen25-Jun-17 3:40
professionalEddy Vluggen25-Jun-17 3:40 
QuestionSQL: Split calendar week between a given two date time Pin
Number0523-Jun-17 3:29
Number0523-Jun-17 3:29 
AnswerRe: SQL: Split calendar week between a given two date time Pin
Richard Deeming23-Jun-17 6:18
mveRichard Deeming23-Jun-17 6:18 
GeneralRe: SQL: Split calendar week between a given two date time Pin
Number0526-Jun-17 22:06
Number0526-Jun-17 22:06 
GeneralRe: SQL: Split calendar week between a given two date time Pin
Number0527-Jun-17 5:10
Number0527-Jun-17 5:10 
GeneralRe: SQL: Split calendar week between a given two date time Pin
Richard Deeming27-Jun-17 5:37
mveRichard Deeming27-Jun-17 5:37 
GeneralRe: SQL: Split calendar week between a given two date time Pin
Number0528-Jun-17 4:30
Number0528-Jun-17 4:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.