-2
ALTER TABLE prueba  ALTER COLUMN nombre SET DEFAULT 13

This sentence doesn't work. The answer in phpmyadmin:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SETDEFAULT 13' at line 1

  • This is an English speaking website. You would need to translate your question to English. – GMB Sep 14 '19 at 20:35
  • aqui tienes escribir en inglés -- here you have to wrizte in english – nbk Sep 14 '19 at 20:39
  • Possible duplicate of [How to alter a column and change the default value?](https://stackoverflow.com/questions/11312433/how-to-alter-a-column-and-change-the-default-value) – GMB Sep 14 '19 at 20:46
  • 2
    `SETDEFAULT 13` must be typo. – Paul Spiegel Sep 14 '19 at 20:53

1 Answers1

0

use instead

ALTER TABLE prueba CHANGE nombre INTEGER(15);

if your column nombre has the type Integer

nbk
  • 45,398
  • 8
  • 30
  • 47