mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
show create tests
This commit is contained in:
@ -88,20 +88,37 @@ drop table t2;
|
|||||||
create table t1 (
|
create table t1 (
|
||||||
test_set set( 'val1', 'val2', 'val3' ) not null default '',
|
test_set set( 'val1', 'val2', 'val3' ) not null default '',
|
||||||
name char(20) default 'O''Brien' comment 'O''Brien as default',
|
name char(20) default 'O''Brien' comment 'O''Brien as default',
|
||||||
c int not null comment 'int column'
|
c int not null comment 'int column',
|
||||||
) comment = 'it\'s a table' ;
|
`c-b` int comment 'name with a space',
|
||||||
show create table t1 ;
|
`space ` int comment 'name with a space',
|
||||||
|
) comment = 'it\'s a table' ;
|
||||||
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`test_set` set('val1','val2','val3') NOT NULL default '',
|
`test_set` set('val1','val2','val3') NOT NULL default '',
|
||||||
`name` char(20) default 'O''Brien' COMMENT 'O''Brien as default',
|
`name` char(20) default 'O''Brien' COMMENT 'O''Brien as default',
|
||||||
`c` int(11) NOT NULL default '0' COMMENT 'int column'
|
`c` int(11) NOT NULL default '0' COMMENT 'int column',
|
||||||
|
`c-b` int(11) default NULL COMMENT 'name with a space',
|
||||||
|
`space ` int(11) default NULL COMMENT 'name with a space'
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table'
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table'
|
||||||
|
set sql_quote_show_create=0;
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE t1 (
|
||||||
|
test_set set('val1','val2','val3') NOT NULL default '',
|
||||||
|
name char(20) default 'O''Brien' COMMENT 'O''Brien as default',
|
||||||
|
c int(11) NOT NULL default '0' COMMENT 'int column',
|
||||||
|
`c-b` int(11) default NULL COMMENT 'name with a space',
|
||||||
|
`space ` int(11) default NULL COMMENT 'name with a space'
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='it''s a table'
|
||||||
|
set sql_quote_show_create=1;
|
||||||
show full columns from t1;
|
show full columns from t1;
|
||||||
Field Type Collation Null Key Default Extra Privileges Comment
|
Field Type Collation Null Key Default Extra Privileges Comment
|
||||||
test_set set('val1','val2','val3') latin1_swedish_ci select,insert,update,references
|
test_set set('val1','val2','val3') latin1_swedish_ci select,insert,update,references
|
||||||
name char(20) latin1_swedish_ci YES O'Brien select,insert,update,references O'Brien as default
|
name char(20) latin1_swedish_ci YES O'Brien select,insert,update,references O'Brien as default
|
||||||
c int(11) NULL 0 select,insert,update,references int column
|
c int(11) NULL 0 select,insert,update,references int column
|
||||||
|
c-b int(11) NULL YES NULL select,insert,update,references name with a space
|
||||||
|
space int(11) NULL YES NULL select,insert,update,references name with a space
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int not null, unique aa (a));
|
create table t1 (a int not null, unique aa (a));
|
||||||
show create table t1;
|
show create table t1;
|
||||||
|
@ -53,9 +53,14 @@ drop table t2;
|
|||||||
create table t1 (
|
create table t1 (
|
||||||
test_set set( 'val1', 'val2', 'val3' ) not null default '',
|
test_set set( 'val1', 'val2', 'val3' ) not null default '',
|
||||||
name char(20) default 'O''Brien' comment 'O''Brien as default',
|
name char(20) default 'O''Brien' comment 'O''Brien as default',
|
||||||
c int not null comment 'int column'
|
c int not null comment 'int column',
|
||||||
|
`c-b` int comment 'name with a space',
|
||||||
|
`space ` int comment 'name with a space',
|
||||||
) comment = 'it\'s a table' ;
|
) comment = 'it\'s a table' ;
|
||||||
show create table t1 ;
|
show create table t1;
|
||||||
|
set sql_quote_show_create=0;
|
||||||
|
show create table t1;
|
||||||
|
set sql_quote_show_create=1;
|
||||||
show full columns from t1;
|
show full columns from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user