In this video, learn how to create tables with PowerShell.
- [Narrator] All right, so the next step … after we've created our databases … is to go ahead and create tables. … So again, we've got two options we can use, … we either use SQLPS in combination with SMO … to go ahead and create that new object, … or we can use just the native … T-SQL to go ahead and create that object … using the CREATE TABLE syntax. … So if we SQLPS again, this is more … the PowerShell style command to actually create the object, … and we create the object, we create the columns, … that are within that object, and then we tell it … to go ahead and execute that against the SQL server. … Under the covers, all it's going to do … is the CREATE TABLE statement. … So if you're in a profiler trace … or an exinence trace on the server … while you're running that SQLPS command, … it would literally just run CREATER TABLE. … We're going to go and do that through … the actual native SQLPS cmdlets … to actually create that object. … Then we're going to go back and we're going to look at …
Author
Updated
6/24/2019Released
6/21/2019- When PowerShell can be particularly useful
- Connecting to SQL Server from PowerShell
- Closing connections
- Creating objects in PowerShell
- Creating tables, views, and procedures
- Querying data in PowerShell
- Using loops in PowerShell
- Exporting CSV files and XML data
Skill Level Intermediate
Duration
Views
Related Courses
-
Learning PowerShell
with Matt Hester1h 23m Beginner -
SQL Server 2017: What's New
with Adam Wilbert1h 22m Beginner
-
Introduction
-
Download tools1m 35s
-
1. PowerShell in SQL Server
-
When PowerShell is useful2m 35s
-
Open-source solutions1m 47s
-
2. Connecting to SQL Server from PowerShell
-
Declaring objects3m 5s
-
Connecting to SQL Server3m 55s
-
Parameters in PowerShell2m 33s
-
Closing connections1m 22s
-
Disposing connections2m 4s
-
Object reuse2m 46s
-
-
3. Creating Objects in PowerShell
-
Creating databases2m 58s
-
Creating tables4m 9s
-
Creating views3m 44s
-
Creating procedures4m 33s
-
-
4. Querying Data in PowerShell
-
Inserting data into tables3m 48s
-
-
5. Looping Through Servers in PowerShell
-
Loops in PowerShell6m 21s
-
Concepts of threading6m 10s
-
Authentication and threading3m 24s
-
Piping between objects3m 17s
-
Exporting CSV files2m 56s
-
Importing CSV files2m 27s
-
Exporting XML data2m 50s
-
Importing XML data2m 26s
-
-
6. PowerShell Remoting
-
What is remoting?5m 18s
-
Removing over HTTP ports2m 11s
-
Enabling remoting via GPO3m 16s
-
Starting a remote session1m 59s
-
Ending a remote session1m 31s
-
Invoking a remote command2m 48s
-
-
Conclusion
-
Next steps33s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Creating tables