-1

What is wrong with this query?

ALTER TABLE KARGO ADD COLUMN test VARCHAR(100) NOT NULL DEFAULT t
benRollag
  • 1,219
  • 4
  • 16
  • 21
ilhan
  • 8,700
  • 35
  • 117
  • 201

2 Answers2

3

The DEFAULT t bit is wrong.

You need to quote the default value DEFAULT 't'

Mihai Stancu
  • 15,848
  • 2
  • 33
  • 51
0

The default value should be quoted as the field is varchar , Correct syntax :

ALTER TABLE KARGO ADD COLUMN testt VARCHAR (100) NOT NULL DEFAULT 't'
Sashi Kant
  • 13,277
  • 9
  • 44
  • 71