views:

44

answers:

2

What do these mean in MySQL? I'm using MySQL workbench and I see I can specify a new column as these... (I noted my guesses)

  • PK – (primary key)
  • NN – (non null)
  • BIN – (binary?)
  • UN – (Unicode?)
  • ZF- (???)
  • AI – (autoincrement?)

Is AI exactly like an Identity specification in MSSQL? (Can I insert a record without specifying the value and it will insert the next available int?)

+4  A: 

ZF is probably ZEROFILL:

CREATE TABLE zf (id INT(5) ZEROFILL NOT NULL DEFAULT 0);

INSERT
INTO    zf
VALUES  (1);

SELECT  *
FROM    zf;

--
00001

UN is not UNICODE, but UNSIGNED (ZEROFILL implies it)

Quassnoi
+1  A: 

NN means not null,

Is AI exactly like an Identity specification in MSSQL? (Can I insert a record without specifying the value and it will insert the next available int?)

Yes you can insert that way.

Aykut