¹ØÓÚMysqlµÄÓαêºÍÁÙʱ±í
SQL code:
create procedure sp_delete_probe
(
p_id int
)
begin
drop table if exists temp_port_ids;
create temporary table temp_port_ids(
port_id int default 0
);
drop table if exists temp_group_ids;
create temporary table temp_group_ids(
group_id int default 0
);
drop table if exists temp_device_ids;
create temporary table temp_device_ids(
device_id int default 0
);
drop table if exists temp_policy_ids;
create temporary table temp_policy_ids(
policy_id int default 0
);
insert into temp_port_ids(port_id) select id from t_ports where probe_id=p_id;
insert into temp_group_ids(group_id) select id from t_devicegroups
where port_id in(select * from temp_port_ids);
insert into temp_device_ids(device_id) select id from t_devices
where port_id in(select * from temp_port_ids);
insert into temp_policy_ids(policy_id) select policy_id from t_devicegroups
where id in(select * from temp_group_ids);
insert into temp_policy_ids(policy_id) select policy_id from t_devices
where id in(select * from temp_device_ids);
delete from t_probes where id=p_id;
delete from t_ports where id in(select * from temp_port_ids);
delete from t_port_ips where port_id in(select * from temp_port_ids);
d
Ïà¹ØÎÊ´ð£º
ÎÒµÄmysqlÔõôûÓа취дÈëÖÐÎÄÊý¾Ý£¿Ö»ÒªÊÇÊý¾ÝдÈëÊý¾Ý¿âʱ ¾Í»á±ä³ÉÈý¸öÎʺŠ£¿Çë½Ì¸ßÈË£¡£¡
linux? ÔõôдÈëµÄ
ÔÚmysqlÖÐÖ´ÐÐ show variables like 'character%'Ìù½á¹û³öÀ´¡£
ÔÚ°²×°MYSLQʱ½«Êý¾Ý¿âµÄ×Ö· ......
Ҫת³ÉÒ»ÑùµÄЧ¹û£¬ÓÃpowerdesignerÔõôת£¿ÄÜתÂð£¿
create table publishers (
publisherID int identity,
publisherName varchar (30) NOT NULL,
constraint pk_publishers primary key (publisherID)
)& ......
´ó¼Ò°ïÎÒ¿´Ï°ɣ¬±¾À´Êý¾Ý¿âûÓж«Î÷£¬ÄÜÏÔʾûÓж«Î÷µÄÐÅÏ¢£¬µ«ÊÇÎÒÌí¼ÓÁËÒ»ÌõÄÚÈݺó£¬×ÖûÁË£¬µ«ÊÇͼƬҲÎÞ·¨ÏÔʾ£¬ºì²æ²æÒ²Ã»ÓУ¬Ôõô»ØÊ°¡£¿
PHP code:
<?php
$str="select * from product wh ......
mysqlÊý¾Ý¿âµÄ±àÂë¸ñʽÊÇutf8
ÔÚc++³ÌÐòÖÐʹÓÃC APIÖ±½ÓÁ¬½ÓmysqlÊý¾Ý¿â£¬°ÑÖÐÎı£´æµ½mysqlÊý¾Ý¿âÖУ¬ÖÐÎç±ä³ÉÂÒÂë
ʹÓÃmysqlµÄloadÃüÁîµ¼ÈëÎı¾Îļþ£¬ÎÞÂÛÎı¾ÎļþÊÇANSI»¹ÊÇutf8±àÂ룬¶¼ÊÇÂÒÂë
ÇëÎÊÉÏÃæÁ½¸öÎÊ ......
±í
CREATE TABLE `ch1` (
`id` int(10) unsigned zerofill NOT NULL AUTO_INCREMENT,
`no` int(10) unsigned DEFAULT NULL,
`dtime` datetime DEFAULT NULL,
PRIMARY KEY (`id ......