Syntax error near 'DEFAULT' SQL SERVER 2014

[expired user #9066]'s profile image [expired user #9066] posted 9 years ago in General Permalink
Hi all,

when i try to set a comment to a table or to a field camp in table i get syntax error..

heidi returns this code:
ALTER TABLE "dbo"."ALMACENES"
COMMENT='prueba
';
/* Error de SQL (102): Sintaxis incorrecta cerca de 'COMMENT'. */

i just try to set a commet "prueba" and click save but no work.

if i try it with a row i get this message:
ALTER TABLE "dbo"."ACCESOS"
ALTER COLUMN "ACCESO" VARCHAR(15) NOT NULL DEFAULT ' ';
/* Error de SQL (156): Sintaxis incorrecta cerca de la palabra clave 'DEFAULT'. */

Alter code:
ALTER TABLE "dbo"."ACCESOS"
ALTER COLUMN "ACCESO" VARCHAR(15) NOT NULL DEFAULT ' ';
EXECUTE sp_addextendedproperty 'MS_Description', 'Campo ACCESO', 'user', 'miquel', 'table', 'ACCESOS', 'column', 'ACCESO';

Sorry for my bad English

[expired user #9066]'s profile image [expired user #9066] posted 9 years ago Permalink
if i try to save a new comment without default value i get this error:

ALTER TABLE "dbo"."ACCESOS"
ALTER COLUMN "ACCESO" VARCHAR(15) NOT NULL;
EXECUTE sp_addextendedproperty 'MS_Description', 'Prueba', 'user', 'miquel', 'table', 'ACCESOS', 'column', 'ACCESO';
/* Error de SQL (15135): Objeto no vĂ¡lido. 'miquel.ACCESOS.ACCESO' no admite propiedades extendidas o el objeto no existe. */
igitur's profile image igitur posted 9 years ago Permalink
I think the latest version r4998 might fix this. I had a similar problem. See http://www.heidisql.com/forum.php?t=18119

Please login to leave a reply, or register at first.