LCKB
[Delete & Replace] Navicat Queries - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Tutorials & Guides (https://lckb.dev/forum/forumdisplay.php?fid=124)
+----- Forum: Ep1 Guides (https://lckb.dev/forum/forumdisplay.php?fid=178)
+----- Thread: [Delete & Replace] Navicat Queries (/showthread.php?tid=395)



- Kotetsu - 10-23-2012


1. Replace some things.

UPDATE <table> SET <column A> = '<value A>' WHERE <column B> = '<value B>';

Exemple : I want replace all mobs to the zone 0 by 127 when the NPC is '126' and the zone_num = 0

So : UPDATE t_npc_regen SET a_npc_idx = '127' WHERE a_zone_num ='0' AND a_npc_idx = '126';

 

In words :

Update the database to set column A = the value A when column B = the value B.

 

2.Delete some records.

 

DELETE FROM '<table>' WHERE '<column A>' = '<value A>';

Exemple : I want delete all mobs in t_npc_regen when the zone is 18.

DELETE FROM `t_npc_regen` WHERE `a_zone_num` = '18' ;

 

In words :

Delete the records from table when column A have the value A.

 

I hope i have helped

Its just a fast tutorial.

 

Cordially, Kotetsu.