SqlFiddle : Test your sql online
-
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
-
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
Nice, but did you really intend to have a non-unique key in
Address
? :confused: /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Nice, but did you really intend to have a non-unique key in
Address
? :confused: /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
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
There are quite a few "fiddle" sites for different technologies: There's a fiddle for that![^] However, steer clear of
refiddle DOT com
for the moment. The site seems to have been taken over by an Indonesian casino. :doh:
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
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
If you didn't came across implicit join until now, then you better left it alone... It will translate to a cross join but without the clear syntax of it... It is not standard too (IIRC it started with MS Access)...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
-
If you didn't came across implicit join until now, then you better left it alone... It will translate to a cross join but without the clear syntax of it... It is not standard too (IIRC it started with MS Access)...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
Quite standard Postgresql. >Which one of these you use is mainly a matter of style. The JOIN syntax in the FROM clause is probably not as portable to other SQL database management systems, even though it is in the SQL standard. For outer joins there is no choice: they must be done in the FROM clause. The ON or USING clause of an outer join is not equivalent to a WHERE condition, because it results in the addition of rows (for unmatched input rows) as well as the removal of rows in the final result.
-
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
MS SQL recognises that syntax as a JOIN and generates exactly the same execution plan.
-
MS SQL recognises that syntax as a JOIN and generates exactly the same execution plan.
Yeah, I think the main thing it helped me with was cleaning up my original Stored Proc query (which already had a bunch of joins). This helped me to easily add the one field I wanted without having to do all the join syntax and it ended up being a little cleaner.
-
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
There is also C# Online Compiler | .NET Fiddle[^]
raddevus wrote:
do a select from two tables allowing you to select just the columns you want
Do not ever do this. It is a very, very old way of doing joins, before join syntax was a thing. It is an ancient form of writing sql. And it IS a join, just in the WHERE clause.
-
There is also C# Online Compiler | .NET Fiddle[^]
raddevus wrote:
do a select from two tables allowing you to select just the columns you want
Do not ever do this. It is a very, very old way of doing joins, before join syntax was a thing. It is an ancient form of writing sql. And it IS a join, just in the WHERE clause.