Reputation: 113
What does this Redshift Identity field creation syntax mean:
idfield int DEFAULT "identity"(6035942, 0, ('1,1'::character varying)::text) NOT NULL
Upvotes: 0
Views: 656
Reputation: 909
See also this question
It will create an INT column named idfield which will get autopopulated with a numeric sequence starting at 1, and incrementing by 1 for every new record. "Autopopulated" means you don't have to specify that column in any INSERT statement: it will automatically get a new value.
A simpler syntax would be idfield int IDENTITY(1, 1) NOT NULL
Upvotes: 1