[Guide] Finding tables containing JID, UserJID, or CharID (For cleanup purposes)

07/08/2015 02:25 witchymoo#1
Hello,

Here I'll share simple query to find tables containing "JID", "UserJID", or "CharID", for cleanup purposes. Well actually, it'll be easier to cleanup the whole thing if you wanna start fresh, and this prolly old and useless to you, but I'll share it anyway.

Now the boring part:
Code:
USE [SRO_VT_SHARD]
GO
-- Find tables containing field "JID" or "UserJID" or "CharID"
SELECT c.name AS ColName, t.name AS TableName FROM sys.columns c JOIN sys.tables t ON c.object_id = t.object_id
WHERE c.name LIKE 'JID' OR c.name LIKE 'UserJID' OR c.name LIKE 'CharID' ORDER BY c.name, TableName ASC
Note: that's only for SRO_VT_SHARD. do the same in ACCOUNT and LOG database.

Result:
07/08/2015 02:55 CriZ-#2
Thanks mate * ;)
07/08/2015 03:45 thebigbody#3
alright that's so helpful to me :D
thx bro ;)