Click here to Skip to main content
15,314,594 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: A career first for me Pin
MarkTJohnson8-Jun-21 4:16
professionalMarkTJohnson8-Jun-21 4:16 
GeneralRe: A career first for me Pin
Gary Wheeler8-Jun-21 4:20
MemberGary Wheeler8-Jun-21 4:20 
GeneralRe: A career first for me Pin
Mike Hankey19-Jun-21 5:39
professionalMike Hankey19-Jun-21 5:39 
GeneralRe: A career first for me Pin
Slow Eddie10-Jul-21 4:25
professionalSlow Eddie10-Jul-21 4:25 
GeneralRe: A career first for me Pin
Gary Wheeler12-Jul-21 2:46
MemberGary Wheeler12-Jul-21 2:46 
GeneralRe: A career first for me Pin
kapalmuks<329-Aug-21 11:49
Memberkapalmuks<329-Aug-21 11:49 
GeneralRe: A career first for me Pin
obermd29-Oct-21 9:58
Memberobermd29-Oct-21 9:58 
GeneralSqlFiddle : Test your sql online PinPopular
raddevus18-May-21 4:19
mvaraddevus18-May-21 4:19 
Part 1
You probably know about jsfiddle and how you run and test your JavaScript in your browser.
But there is also a SQLFiddle which allows you to run and test your sql in your browser[^].
It's quite convenient.
Supports MySQl, Postgres, Sqlite, Oracle and Sql Server.
Also, if you work on a query, you can save the URL and get back to it.
Part 2
I recently discovered that you can do a select from two tables allowing you to select just the columns you want (versus a join). I don't know why that amazed me, but I'd never tried it before and it really helped in a current situation.
here's a very simplified sqlfiddle example:
SQL Fiddle[^]

edit
fixed initial link to sqlfiddle

modified 18-May-21 13:25pm.

GeneralRe: SqlFiddle : Test your sql online Pin
Ravi Bhavnani18-May-21 6:18
professionalRavi Bhavnani18-May-21 6:18 
GeneralRe: SqlFiddle : Test your sql online Pin
raddevus18-May-21 7:24
mvaraddevus18-May-21 7:24 
GeneralRe: SqlFiddle : Test your sql online Pin
Richard Deeming18-May-21 21:45
mveRichard Deeming18-May-21 21:45 
GeneralRe: SqlFiddle : Test your sql online Pin
Kornfeld Eliyahu Peter18-May-21 22:19
professionalKornfeld Eliyahu Peter18-May-21 22:19 
GeneralRe: SqlFiddle : Test your sql online Pin
Peter Adam23-May-21 23:03
professionalPeter Adam23-May-21 23:03 
GeneralRe: SqlFiddle : Test your sql online Pin
StarNamer@work24-May-21 4:45
professionalStarNamer@work24-May-21 4:45 
GeneralRe: SqlFiddle : Test your sql online Pin
raddevus24-May-21 8:54
mvaraddevus24-May-21 8:54 
GeneralRe: SqlFiddle : Test your sql online Pin
SeanChupas24-May-21 11:01
MemberSeanChupas24-May-21 11:01 
GeneralRe: SqlFiddle : Test your sql online Pin
raddevus24-May-21 11:58
mvaraddevus24-May-21 11:58 
GeneralBelt and suspenders Pin
Jörgen Andersson14-May-21 4:23
professionalJörgen Andersson14-May-21 4:23 
GeneralRe: Belt and suspenders Pin
RickZeeland14-May-21 5:54
mveRickZeeland14-May-21 5:54 
GeneralRe: Belt and suspenders Pin
Bernhard Hiller18-May-21 20:54
MemberBernhard Hiller18-May-21 20:54 
GeneralRLIOTD Pin
Gary Wheeler5-May-21 10:47
MemberGary Wheeler5-May-21 10:47 
GeneralRe: RLIOTD Pin
Rick York5-May-21 11:34
mveRick York5-May-21 11:34 
GeneralRe: RLIOTD Pin
Gary Wheeler5-May-21 12:32
MemberGary Wheeler5-May-21 12:32 
PraiseRe: RLIOTD Pin
Slacker0075-May-21 12:25
professionalSlacker0075-May-21 12:25 
GeneralRe: RLIOTD Pin
Gary Wheeler5-May-21 12:32
MemberGary Wheeler5-May-21 12:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.