MySQL Forums
Forum List  »  General

Re: Foreign key constraints missing from SHOW CREATE TABLE output
Posted by: Rick James
Date: December 29, 2010 03:08PM

I find that hard to believe:

mysql> SET @@SESSION.SQL_MODE = '';
mysql> SHOW CREATE TABLE abc \G
*************************** 1. row ***************************
       Table: abc
Create Table: CREATE TABLE `abc` (
  `HELLO` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8

mysql> SET @@SESSION.SQL_MODE = 'ANSI_QUOTES';
mysql> SHOW CREATE TABLE abc \G
*************************** 1. row ***************************
       Table: abc
Create Table: CREATE TABLE "abc" (
  "HELLO" varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8

Note the backtics versus quotes.
(I realize that this does not explain your lack of CONSTRAINTs.)

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.