tags:

views:

57

answers:

5

Is there any software for Windows that allows you to setup your tables and then tell the software what you want to SELECT given the conditions and it will tell you the SQL query that you need? Thanks.

+1  A: 

These sound like they will do what you want:

Having said that, I do agree with the other answers here - learning to manually write SQL will give you a lot more control. I highly recommend the (free) MySQL Workbench for that.

Cocowalla
Thanks for the suggestions
Axsuul
+2  A: 

Probably you'll find software that will do this for you in a GUI, but eventually you will be required to write the queries yourself, unless you're developing something really trivial.

A GUI tool for SELECT statements is a too-high level of abstraction for most scenarios, and you would have to face the "Law of Leaky Abstractions" eventually.

Visualization tools are quite handy for defining the database schema, and there are some very good tools for that. However queries remain quite tricky to visualize, in my opinion. I think you'll be able to mentally visualize queries, given enough practice. Nevertheless, I'm quite sure you will be able to get started doing SQL queries within a few days, even non-trivial ones.

In addition, you can use Stackoverflow if you require assistance with complicated queries. I'm quite sure that the community here will suggest better SQL than any GUI tool!

Daniel Vassallo
Cool, thanks for the article. I understand that SQL queries will eventually have to be written by me, but I was hoping that by visualizing it I could understand how they work better.
Axsuul
Visualization tools are quite handy for defining the database schema, but queries remain quite tricky to visualize in my opinion. I think you'll be able to visualize them automatically with enough practice. However I'm quite sure you will be able to get started doing non-trivial SQL queries within a few days.
Daniel Vassallo
Thanks for the advice, hoping to accomplish this in the very near future
Axsuul
+1  A: 

The people at sqlmanager.net build some tools to deal with databases, but I agree with Daniel: if you have very complex queries to work with, it's probably more work telling the tool what to do that creating the queries manually - especially as you'll have to verify what the tool did, so if you can do that, you could have done it by hand in the first place :)

Select0r
+1  A: 

As said before by daniel vassallo, you should learn how to create those sql queries "by hand". where i work we use a program that does exactly this (it's used by accountants only) and it creates horrible sql select statements and we have constantly whining accountants that think that the problem is allways on the server side even when we show them that those queries get them the wrong data... it's a never ending circle :(

Gabriel
A: 

Use HeidiSQL to manage your database, and keep an eye on what's going on in the SQL log. You'll soon pick it up.

TRiG