Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¹ØÓÚ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ÈçºÎÓëC++Á¬½Ó£¿ - VC/MFC / Êý¾Ý¿â

ÎÒÊÇÐÂÊÖ£¬³õѧMYSQL£¬Óкܶ಻¶®£¬Íû´Í½Ì£¡£¡
±ÈÈç˵ÎÒн¨Ò»¸öMYSQLÊý¾Ý¿âUSER Êý¾Ý¿âÖÐÓбíLIST 
È»ºóÎÒÔÚVCÖÐн¨Ò»¸öMFC¶Ô»°¿ò¹¤³Ì£¬È»ºóÎÒÔõôÑù²ÅÄÜÓÃVC»ñµÃÊý¾Ý¿âÖбíµÄÊý¾Ý£¿
Ï£Íû¸ø³ö¾ßÌåµÄ²Ù×÷² ......

Sqlserver Óï¾äת³ÉMySqlÓï¾ä

Ҫת³ÉÒ»ÑùµÄЧ¹û£¬ÓÃpowerdesignerÔõôת£¿ÄÜתÂð£¿
create table publishers (
publisherID int identity,
publisherName varchar (30) NOT NULL,
constraint pk_publishers primary key (publisherID)
)& ......

mysql root¸ÄÁËÃÜÂ룬ÓÖ×Ô¶¯±äÁË

¸Õ°²×°mysqlµÄʱºò£¬°Ñ³õʼÃÜÂëÍü¼ÇÁË£¬Ö»ºÃÌø¹ýȨÏÞÑéÖ¤£¬ÐÞ¸ÄÃÜÂ룬Ð޸ijɹ¦ºó£¬ÄܵǼ£¬¿ÉÊÇ»úÆ÷ÖØÆôÁË£¬ÓøĹýµÄÃÜÂëÓֵDz»ÉÏÁË£¬ÏÂÎÄÊÇÐ޸ĵķ½·¨£¬²»ÖªµÀÄÄÀï³öÁËÎÊÌ⣿
ÃÜÂëÐ޸ķ½·¨£º
  1.ÒÔϵͳ¹ ......

mysqlÊý¾ÝÕÒ»ØÄÑÌ⣬¸ß·Ö£¬¼±£¡£¡£¡

ÎÒÔÚÇåÀímysqlµÄʱºò£¬Ò»²»ÁôÉñ½«mysql(¼´dataÀïµÄmysqlÎļþ¼Ð)Êý¾Ý¿â¸øÉ¾µôÁË£¬¸ôÁ˼¸¸öСʱÎÒÖØÆôÁËmysqlÈí¼þ£¬mysql¾Í×Ô¶¯³õʼ»¯ÁËÊý¾Ý¿â£¬µ¼Ö´Óɾ³ýmysqlÎļþ¼Ð¿ªÊ¼µ½ÖØÆôÕâ¶Îʱ¼äµÄÊý¾Ý¶ªÊ§£¬ÄÇλ¸ßÊÖ°ïÏëÏë°ì ......

MysqlЧÂÊÎÊÌâ - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql

±í
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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ