Book a Demo

Author Topic: PK from numeric type to varchar (EA 10.0.1009)  (Read 3056 times)

PepperPot

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
PK from numeric type to varchar (EA 10.0.1009)
« on: December 05, 2013, 10:57:21 pm »
Hi,

This happens when generating DDL for SQL-Server, I've only tried with 2008 but I don't see why it wouldn't impact all SQL-Server variants.

If you have a table where the PK field is a numeric type and auto-numbered, generating the DDL produces the expected results.  However if you then change the PK to a varchar the DDL generated is invalid.  It's along the lines of:

Code: [Select]
CREATE TABLE [test].[mytable](
    [columnname] varchar(10) identity(1,1) NOT NULL
);

which doesn't really work  :)
« Last Edit: December 05, 2013, 11:06:34 pm by PepperPot »