bonjour,
Je cherche un moyen pour plusieurs créations de table dans une procédure.
Sous quel forme de bloc est ce possible ?
Je débute dans ce domaine
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `light2`(OUT `tut` INT(25) UNSIGNED) NO SQL CREATE TABLE IF NOT EXISTS `j1_thermo` ( `id` int(3) NOT NULL AUTO_INCREMENT, `hr` varchar(20) NOT NULL, `pulse` decimal(3,1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=49$$ CREATE TABLE IF NOT EXISTS `j2_thermo` ( `id` int(3) NOT NULL AUTO_INCREMENT, `hr` varchar(20) NOT NULL, `pulse` decimal(3,1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=49$$ DELIMITER ;
@+
nb : je rajoute que je veux des tables avec une portée limitée dans le temps
C'est php qui appelera la procedure
Partager