From the course: LINQPad Essential Training

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Query the database with SQL

Query the database with SQL - LINQ Tutorial

From the course: LINQPad Essential Training

Query the database with SQL

- [Narrator] Now that we have an active connection to the database we can use it in any query window. So here's how you would do this. Create a new query by clicking on the plus sign and then I want to write some SQL, so I'll choose this SQL editor, and then I'll look for my active connection and choose it here, and now I can start writing my SQL in this window. I'll work with one of these tables, remember that you can open the connection and look at the table names. So I want to get all the products, so I'll say select star from products and press alt 5 on the query. I get back 77 rows, and about 11 columns of data here. So let's limit the columns. I'll use product name and unit price. Now to see those names on the column names you can expand the table and see the column definitions. So I'm looking for product name and unit price, and since they have spaces in them, I'll need square brackets. So I'll replace this…

Contents