Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto increment added in query.method == insert !!! #22

Closed
wants to merge 4 commits into from
Closed

Auto increment added in query.method == insert !!! #22

wants to merge 4 commits into from

Conversation

fulviocanducci
Copy link

Example

INSERT INTO [table] ([name], [year]) VALUES (sqlkata, 2000);SELECT SCOPE_IDENTITY();            
INSERT INTO `table` (`name`, `year`) VALUES (sqlkata, 2000);SELECT LAST_INSERT_ID();
INSERT INTO \"table\" (\"name\", \"year\") VALUES (sqlkata, 2000);SELECT lastval();
INSERT INTO [table] ([name], [year]) OUTPUT inserted.id VALUES (sqlkata, 2000)

@ahmad-moussawi
Copy link
Contributor

Nice idea, but I am not sure how much is it correct to do this in such implicit way, I'll keep it in the back log for now, I think we can rethink of it after implementing the returning functionality suggested by #8 @hey-red

@fulviocanducci
Copy link
Author

@ahmad-moussawi e @hey-red
was really an idea, because in the package I mentioned I will implement this to return the inserted id. Thanks for liking the idea, but, I believe that creating the way your package is the best solution, but, it stands as a reference.

Project:

Web Projet Test

Thanks you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants