Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2008
    Posts
    4

    Unanswered: Setting Column Default Value in SQL

    I've tried to use the following query:

    Code:
    ALTER TABLE QDEngine_PES_ES ADD ES_DoorClosed SINGLE default 0
    But I get a syntax error at the '0' when trying to run it.

    If I take the '0' off, it runs just fine, but doesn't create a default value for the column.

    What am I doing wrong?

  2. #2
    Join Date
    Sep 2008
    Posts
    4
    Nevermind - I found the problem. Seems the 'Default' keyword doesn't work when you pass it through using the Access SQL editor window, but when you pass the query through using OleDB and MS Jet it gets accepted.

    Weird.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •