#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    75
    Rep Power
    12

    Create Table Error


    hello ..

    Can anyone tell me what's wrong with the create table statements below? It returns me this error:
    [Microsoft][ODBC SQL Server Driver]Syntax error or access violation

    ============================

    CREATE TABLE LOGS {
    IDX BIGINT(8),
    TIMESTAMP ,
    CL_ACCOUNT INT(4),
    QUERYSTRING NVARCHAR(80),
    RESULTCOUNT INT(4),
    IP_ADDRESS NVARCHAR(20),
    };
    ===========================

    i wanted column "IDX" to be a auto-increment field and timestamp to log the data and time a record is inserted to the table.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2003
    Location
    Paris Uppland
    Posts
    2,385
    Rep Power
    391
    Code:
    CREATE TABLE LOGS (
    IDX BIGINT,
    insertedDateTime datetime 
    default getdate(),
    CL_ACCOUNT INT,
    QUERYSTRING NVARCHAR(80),
    RESULTCOUNT INT,
    IP_ADDRESS NVARCHAR(20),
    )

IMN logo majestic logo threadwatch logo seochat tools logo