Sometimes one can see an error like:
MySQL database failed! : SQL flush privileges failed : Table 'mysql.servers' doesn't exist at...
A guy named Chris Brown suggested the following:
USE mysql;
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
середа, 25 листопада 2009 р.
вівторок, 17 листопада 2009 р.
Ignore duplicates for unique fields
So, you add multiple data rows into table with UNIQUE index on some field but when you add the duplicates into that field the routine is stopped.
How to make the insert skip those values?
Create the index in this way:
CREATE INDEX NotAllowed
ON Dest (Value)
WITH(IGNORE_DUP_KEY = ON);
go
How to make the insert skip those values?
Create the index in this way:
CREATE INDEX NotAllowed
ON Dest (Value)
WITH(IGNORE_DUP_KEY = ON);
go
The size of NULL
How much space does NULLs take for different types?
What nullable types allocate space even when null?
What nullable types allocate space even when null?
Do columns occupy space even if they store NULL?
http://sankarreddy.spaces.live.com/blog/cns!1F1B61765691B5CD!387.entry
Space used for NULL
http://social.msdn.microsoft.com/Forums/en/sqlgetstarted/thread/e6b8abb8-851e-498d-93f0-2701f8e44b22
Null Values
Підписатися на:
Дописи (Atom)