LMSouq
database Open

Alter a MySQL column to be AUTO_INCREMENT

C.
C. Ross
1 month ago
3 views
Problem Description
I’m trying to modify a table to make its primary key column `AUTO_INCREMENT` after the fact. I have tried the following SQL, but got a syntax error notification. <!-- language: lang-sql --> ALTER TABLE document ALTER COLUMN document_id AUTO_INCREMENT Am I doing something wrong or is this not possible? <pre> +--------------------+ | VERSION() | +--------------------+ | 5.0.75-0ubuntu10.2 | +--------------------+ </pre>

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base