Forum Replies Created
-
AuthorPosts
-
aurelienMember
This is an exemple of the structure of a table.
Code:/*Column Information For – animatrices-14-06-05.tva*/
—————————————————–Field Type Collation Null Key Default Extra Privileges Comment
———- ———– —————– —— —— —————– ————– ——————————- ——-
serveur_id varchar(20) latin1_swedish_ci PRI serveur select,insert,update,references
num int(11) NULL PRI (NULL) auto_increment select,insert,update,references
tva double NULL YES 0 select,insert,update,references
date date NULL YES (NULL) select,insert,update,references
ts timestamp NULL YES CURRENT_TIMESTAMP select,insert,update,references/*Index Information For – animatrices-14-06-05.tva*/
—————————————————-Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
—— ———- ——– ———— ———– ——— ———– ——– —— —— ———- ——-
tva 0 PRIMARY 1 serveur_id A 1 (NULL) (NULL) BTREE
tva 0 PRIMARY 2 num A 1 (NULL) (NULL) BTREE
tva 1 num 1 num A 1 (NULL) (NULL) BTREE/*DDL Information For – animatrices-14-06-05.tva*/
————————————————–Table Create Table
—— ————————————————————————————————————————————————————————————————————————————————————————————————————————————————————-
tva CREATE TABLE `tva` (
`serveur_id` varchar(20) NOT NULL default 'serveur',
`num` int(11) NOT NULL auto_increment,
`tva` double default '0',
`date` date default NULL,
`ts` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (`serveur_id`,`num`),
KEY `num` (`num`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1The PK is a combinate key. It compose of 2 field, a varchar type and an integer type.
I'm available to yours other questions.
-
AuthorPosts