From the course: PowerShell for SQL Server Administration

Unlock the full course today

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

Returning data from SQL Server

Returning data from SQL Server - PowerShell Tutorial

From the course: PowerShell for SQL Server Administration

Start my 1-month free trial

Returning data from SQL Server

- [Instructor] All right, so now that we've created tables, and we've created these, we've created stored procedures, we've inserted data into a table. Now, it's time to do the most important thing for any app. Show data. And we need to return data back to the screen, back to the user. So we're going to look at a couple of examples in a second here, and all we're going to do in these examples is just return the data back to the screen. You can do much more with PowerShell than this. You can obviously return the data into an object. You can iterate through things in memory. We're just showing the basics of how to get the data back. What you do with it at that point, totally different matter. So there's a few ways to do this. You can use SQLPS and use the Read-SqlTableData cmdlet to pull data back from a table, or you can use native T-SQL to pull data back using normal select statements. It's just going to matter what you want to do, and how you want to join data, and what you want to…

Contents