Saturday, April 3, 2010

SQL!

So, this past week I had an interview with Ericsson for a position as a federal engineering co-op. The main requirements other than being able to work in a group and all that normal stuff were c++ and SQL. Well, luckily I have had a pretty good exposure to C++, but I had not experienced and did not know much about SQL. I knew it involved databases, but that was about it. So, in preparation for my interview I decided that it would be beneficial to learn a bit about SQL.

SQL was originally created by IBM (fun fact!).

The most important part of using SQL is the query ability. This is used to get information from a database. You are able to select an entire row or column. You can also use comparative operators to return only elements that are true for that operator.

Sample Code (borrowed from wiki):

SELECT *    //select the columns    
FROM Book   //tells which table is being taken from    
WHERE price > 100.00 //comparative operator     
ORDER BY title;  //sort alphabetically by book title

A few more notes about the above code: The (*) following the select indicates that 
all the columns need to be returned.

A few other neat feature is the ability to join tables.

I am by no means an expert on SQL, but as a whole it seems like something that would be very easy to pick up and could pay dividends on interviews and improve your resume. Also, I'm glad I looked into it because I got the co-op and I am glad I took the time to properly prepare for the interview.




No comments:

Post a Comment