From the course: Scala Essential Training for Data Science

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Querying with SQL strings

Querying with SQL strings - Scala Tutorial

From the course: Scala Essential Training for Data Science

Start my 1-month free trial

Querying with SQL strings

- [Narrator] So, let's continue our discussion about how we select using strings. Now, recall we had to find a value called resultSet, and resultSet was set to the statement object, which executed a query, and the query we had executed was "Select * from emps," and then this return to cursor, so we wanted to move that along to the next item in the list, and then we're able to look up individual columns on this particular row. So, for example, we could look up the resultSet, get string, and I'm just going to show all of the options with getS, and we'll look up department. And this first person works in the Computer Department. Let's change that, let's just up arrow and change department to last name so we can see who we're talking about. Ah, okay, that's right, it's Kelley, and let's just check the start date. Okay, so we figured out that the person whose last name is Kelley, we know what department they work in and what their start date is, so that's great. It's a little inconvenient…

Contents