Skip to main content
12 events
when toggle format what by license comment
Sep 11, 2019 at 17:02 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
May 9, 2019 at 14:02 history bumped CommunityBot This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Apr 8, 2019 at 22:20 answer added fredt timeline score: 1
Jun 13, 2018 at 13:53 comment added user1822 Then use a sequence. But showing the user generated ID values is a bad idea in my experience.
Jun 13, 2018 at 13:48 comment added BrainStone @a_horse_with_no_name the use case would be showing the user which ID will be next. And there are other related use cases.
Jun 13, 2018 at 13:47 history edited BrainStone CC BY-SA 4.0
edited title
Jun 13, 2018 at 13:36 comment added user1822 That gives the starting value of the underlying (unnamed) sequence. That is not the "next value". What do you need that "next value" for? If you need it to populate FK columns for subsequent inserts into other tables you can use identity() to retrieve the generates value after inserting. Another option is to define the IDENTITY column based on a (named) sequence.
Jun 13, 2018 at 13:25 comment added BrainStone @a_horse_with_no_name I updated my question. I also might have found the soltion.
Jun 13, 2018 at 13:22 history edited BrainStone CC BY-SA 4.0
added 626 characters in body
Jun 13, 2018 at 13:06 comment added BrainStone @a_horse_with_no_name That is talking about sequences. Not the table auto id values.
Jun 13, 2018 at 12:35 comment added user1822 From the manual: Example 4.1. inserting the next sequence value into a table row
Jun 13, 2018 at 11:15 history asked BrainStone CC BY-SA 4.0