MySQL row declarations?
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 开发者_如何学Goexactly like an Identity specification in MSSQL? (Can I insert a record without specifying the value and it will insert the next available int?)
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)
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.
精彩评论