Explore the Microsoft sample sql db
1. First of all download, the ms adventure works DB from this site.
2. You have to download the OLTP .bak file.
NOTE: Download the latest db
3. Now you have to restore the downloaded sample db. You can do this either by command RESTORE or by using the mssql server management studio gui.
4. we will do this by using the gui first. So first move that sample db to the backup folder of sql server.
NOTE: path look like this: C:\Program Files\Microsoft SQL Server\MSSQL15.SQLEXPRESS\MSSQL\Backup
5. Open ssms, connect it to the server.
6. On the left side, right click on the database folder and choose the Restore Database option.
7. Now choose from the DEVICE, click on 3... (...)
8. choose the .bak downloaded sample db and press ok..
Finally, you will get a pop up indicating that your sample db is restored.
Till now we downloaded and installed the sample db. Its the time to explore it.
As you click on the database, you will be to see the sample db there.
1. Click on the sample DB.
2. Click on the table folder.
3. Then you will get a number of tables.
4. For example[ HumanResources.Employee]::[schema.Table]
5. Right-click on this table in 4 and click on SELECT TOP 1000 ROWS.
6. This is gonna print the top 1000 rows from that table.
7. Practice all the SQL queries you have learned before.
NOTE: The more you play with the queries and the table, the more you get familiar with how DB management works
Labels: sql
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home