On 20 September 2010 20:58, Merlin Moncure wrote:
> On Mon, Sep 20, 2010 at 10:08 AM, Thom Brown wrote:
>> On 20 September 2010 14:53, Carlos Mennens wrote:
>>> I have a table in my database and would like to modify the one column
>>> that is already configured to be the PRIMARY KEY but I forgot
On Mon, Sep 20, 2010 at 10:08 AM, Thom Brown wrote:
> On 20 September 2010 14:53, Carlos Mennens wrote:
>> I have a table in my database and would like to modify the one column
>> that is already configured to be the PRIMARY KEY but I forgot to set
>> it for AUTO_INCREMENT. For some reason I can'
Thanks all! I understand the concept now.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On 20 September 2010 19:54, Carlos Mennens wrote:
> On Mon, Sep 20, 2010 at 2:43 PM, A.M. wrote:
>> DEFAULT
>
> Sorry just to be clear you're saying that I need to enter the command as:
>
> INSERT INTO table_name DEFAULT VALUES (
> 'data',
> 'data',
> 'data',
> 'data',
> '2010-09-20'
> );
>
Well
On 09/20/2010 11:40 AM, Carlos Mennens wrote:
On Mon, Sep 20, 2010 at 10:08 AM, Thom Brown wrote:
CREATE SEQUENCE seq_blades_id;
SELECT setval('seq_blades_id', max(id)) FROM blades; -- set the
sequence's value to the maximum value of "id"
ALTER TABLE blades ALTER COLUMN id SET DEFAULT
nextval('
On 20 September 2010 19:40, Carlos Mennens wrote:
> On Mon, Sep 20, 2010 at 10:08 AM, Thom Brown wrote:
>> CREATE SEQUENCE seq_blades_id;
>> SELECT setval('seq_blades_id', max(id)) FROM blades; -- set the
>> sequence's value to the maximum value of "id"
>> ALTER TABLE blades ALTER COLUMN id SET D
On Mon, Sep 20, 2010 at 2:43 PM, A.M. wrote:
> DEFAULT
Sorry just to be clear you're saying that I need to enter the command as:
INSERT INTO table_name DEFAULT VALUES (
'data',
'data',
'data',
'data',
'2010-09-20'
);
Or does the 'DEFAULT' value go in ( )?
--
Sent via pgsql-general mailing lis
On Mon, Sep 20, 2010 at 10:08 AM, Thom Brown wrote:
> CREATE SEQUENCE seq_blades_id;
> SELECT setval('seq_blades_id', max(id)) FROM blades; -- set the
> sequence's value to the maximum value of "id"
> ALTER TABLE blades ALTER COLUMN id SET DEFAULT
> nextval('seq_blades_id'); -- make default value
On 20 September 2010 14:53, Carlos Mennens wrote:
> I have a table in my database and would like to modify the one column
> that is already configured to be the PRIMARY KEY but I forgot to set
> it for AUTO_INCREMENT. For some reason I can't find what the proper
> command would be in the documenta