Results 1 to 7 of 7

Thread: TSQL and Autogenerate **SOLVED**

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476

    Resolved TSQL and Autogenerate **SOLVED**

    Hi all, I am pretty new to that TSQL thingy. Herers one thing I just cant seem to find an answer on the net!
    I use MS SQL Server 2000.
    This is what I do to create a new Table:

    Code:
    CREATE TABLE blah
    (
    blahId integer Primary Key Not Null,
    myText varchar(50)
    )
    Go
    This works fine. But I want to tell the SQLServer that the blahId will be autogenerated by the Database. What would I need to include in my script. I tried generate and autogenerate but both dont seem to work!

    Also how would my insert Statement look like.
    Usually you would like this:

    INSERT INTO blah VALUES (NULL,'someText')

    Will that still work?

    Thanks,

    Stephan
    Last edited by Sgt-Peppa; Jun 23rd, 2005 at 11:35 AM.
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

Posting Permissions

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



Click Here to Expand Forum to Full Width