Tag Info

New answers tagged

0

OBSERVATIONS According to the MySQL 5.0 Documentation As of 5.0.2, the server requires that month and day values be legal, and not merely in the range 1 to 12 and 1 to 31, respectively. With strict mode disabled, invalid dates such as '2004-04-31' are converted to '0000-00-00' and a warning is generated. With strict mode enabled, invalid dates generate ...


5

E-mail address: I go with NVARCHAR(320) - 64 characters for local part + @ + 255 for domain name. You may also consider normalizing the domain away, since it's pretty wasteful to store hotmail.com 500,000 times when a much smaller INT or even SMALLINT is probably capable (I don't know how many domains you plan to support). I used to be against NVARCHAR but ...


2

Views do not have datatypes; they reference columns in tables that do have datatypes. You can do an explicit CONVERT() in a View, but just like any query, it will return the underlying type. Now, doing what amounts to a "default" (especially inline with your request to use DATETIME2 even if someone tries to use another type) is a bit complicated and shown ...


2

No, there isn't a way to automatically change a datetime field to a datetime2 field if the former is specified in a table creation. To do it manually: ALTER TABLE [table] MODIFY COLUMN [column] DATETIME2; If the issue pertains to end users, education is your best bet to make the creation of tables more uniform and compliant with using datetime2.


0

You need to tweek a few things. STEP 01 Simply add these to my.cnf under the [mysqld] group header [mysqld] max_allowed_packet = 1G innodb_log_file_size = 1G innodb_log_buffer_size = 64M STEP 02 Login to MySQL and run this mysql> SET GLOBAL index_fast_shutdown = 0; STEP 03 service mysql restart Since you are running MySQL 5.6, the log files ...


2

They are the same thing in a default installation. pg_catalog.text is the schema-qualified version of the type name text. The search_path always contains pg_catalog automatically. Per documentation: In addition to public and user-created schemas, each database contains a pg_catalog schema, which contains the system tables and all the built-in data ...



Top 50 recent answers are included