Saturday, September 25, 2010

Week 4: SQL Essential Training cont.


Now it’s time to learn how to use SQL. It seems to be very easy but I will find out as I go along. Being able to write down what I learn helps me to retain the information.

The tables used for this SQL example where countries and albums. Simple select data is used a lot in SQL. What it does is return all of the data entered from the table that contains that information. When placing an asterisk after the word select it will display all of the rows and columns for that query. When writing SQL it is important to write with single quotes. It is also important to be specific as possible in how you write your query. Understanding how a database is organized can tell you how to work with that database.

 The DBMS may require different SQL syntax, because it is vendor specific. SQL statements consist of different clauses and statements. White space is ignored in SQL. Every SQL statement must be terminated by a semi colon. It does not have to be there when writing just one statement. The insert statement is used to create a new row in the table. Join query will get information from more than one table.

There were several key words to learn when submitting a query. Words such as: Select, Where. Like, In, Distinct.  SQL is a way to create reports for several reasons. This assists in inputting and retrieving data whenever needed.  In the data base world and index is a quick way to search what you are inquiring about. SQL operates on strings and a string is a set of characters. Different platforms may require a slightly different way to input the string. Using the trim function will delete all of the extra spaces in a query.

I have learned a lot this time around on the different applications of SQL.



No comments:

Post a Comment