SQL
Home Up Mission Statement Visual Basic 6 Tools of the Trade SQL Things .Net Java Domino

 

Back Home Next

Up

ourmission
theweb.gif (1103 bytes)
booksandbibles16
thenewsroom
governmentrm.gif (1147 bytes)
searchpage
tutorials
webtools
websecurity

What is the Web?

Privacy & Disclaimer
copyrights
notices
HOME

Visitors Since
Aug - 2004

Hit Counter

 

SQL

There is a very big world of SQL out there and after awhile you will understand that there are differences in the various flavors.

I started with MySQL and java drivers. Getting things working fairly well, and doing copies and table drops between servers in my little lab.

A good tool, to get to know, is TOAD. Eventhough you will probably start using the MySQL server console, that comes with the WinMySQL, if you are using windows XP.

It is nice, and rather dynamic, but I like using toad, after getting the sql server configured and up and running with the java connectors.

   
The language is simple to begin with, and can be quite straight forward to understand. Wanting to select items from a table, you use something called an sql query.

SELECT FirstName, LastName
FROM    EmployeeTable

This query will look for a table called EmployeeTable from the database on your current connection, then look in the two columns FirstName and LastName and pull all the information from every record. Meaning that a record equates to a row of 'data' in the table.

You can also add conditions to the query, so that you can selective pull out the data. Maybe, you want to know last names where the name is Smith?

You would add a second line to the query as follows:

SELECT FirstName, LastName
FROM    EmployeeTable
WHERE LastName = 'SMITH'

Now we get all of the employees from the table named Smith. Or, non if there is a lack of Smiths in your employee names.

Yes. The language is very easy, when you are working with a local server in your lab, but I am going to write about a few things when using SQL and Java together that make you thin what you did at home, might just be wrong.

 

 
If you have a mixed environment, as I do, and decided to work with SQL server 2005, the SQL server manager for 2000 will not read those tables or even talk to the server. So, be prepared to. And, that is why I like using Toad. It seemed to work and play with everyone.