I needed to find columns containing a certain string. That is, the name of the column should contain that string. Actually not too difficult to do 🙂
SELECT owner,TABLE_NAME, column_name FROM all_tab_columns WHERE column_name LIKE'%FOO_ID%';
That gives you a nice list of all columns containing FOO_ID and what tables you find them in. Fantastic! Now, back to work…
Ever wanted to, for some reason, clone a database table? Don’t really want to export anything or figure out what statement was used to create that table? Turns out that’s a lot easier to do than I thought it was.
Having revisions on my posts is nice I suppose. But I was starting to get a bit annoyed with the increasingly long list of revisions in each post. And they really did get long. Mainly because I am in a bit of a testing and experimenting phase which means that I have done a lot of adjustments to almost every single post so far because I don’t have 100% control on how I want things or how things will end up looking and so on 😛 There’s also of course all the obligatory spelling errors I only discover after I have clicked Publish 😛
Anyways, I found a nice little MySQL snippet to clear out all of them in a French comment to a blog post. Thought I could share it here. That way I won’t lose it either 🙂