ADIGA88
Member
- Local time
- Tomorrow, 02:16
- Joined
- Apr 5, 2020
- Messages
- 94
Hi guys,
I am trying to edit the default value of a text field through the SQL ALTER command but just getting this syntax error.
the command:
I copied the syntax from the W3 website.
Thanks,
I am trying to edit the default value of a text field through the SQL ALTER command but just getting this syntax error.
the command:
Code:
Sub ChangeDefaultForPostedByInTransmittal(db As DAO.Database)
Dim SQL As String
SQL = "ALTER TABLE tblTransmittal ALTER COLUMN strPostedBy SET DEFAULT 'Hi';"
db.Execute SQL
End Sub
I copied the syntax from the W3 website.
SQL DEFAULT Constraint
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
Code:
ALTER TABLE Persons
ALTER COLUMN City SET DEFAULT 'Sandnes';
Thanks,