1 00:00:00,000 --> 00:00:04,858 [MUSIC] 2 00:00:04,858 --> 00:00:09,025 Throughout this course you'll be using Treehouse's interactive database 3 00:00:09,025 --> 00:00:13,210 environment, SQL Playground to write SQL programming code. 4 00:00:13,210 --> 00:00:17,340 You can press the launch SQL button at the beginning of each video to 5 00:00:17,340 --> 00:00:20,160 launch an interactive SQL environment. 6 00:00:20,160 --> 00:00:23,870 You can use the Playground to run the code that I'll be talking about in the video. 7 00:00:23,870 --> 00:00:27,720 Now, don't worry if this looks slightly different from what 8 00:00:27,720 --> 00:00:29,330 you have on your screen. 9 00:00:29,330 --> 00:00:31,910 That just means you've probably got a newer version 10 00:00:31,910 --> 00:00:36,310 of SQL Playground with all the latest and greatest features. 11 00:00:36,310 --> 00:00:40,750 Each Playground will have a number of pre-populated coding areas listed here 12 00:00:40,750 --> 00:00:41,850 at the top left. 13 00:00:41,850 --> 00:00:45,369 [SOUND] As I discuss the SQL programming code, 14 00:00:45,369 --> 00:00:50,287 feel free to hit the Run button to run the SQL programming code. 15 00:00:50,287 --> 00:00:53,700 Don't worry if you don't understand what this means right now. 16 00:00:53,700 --> 00:00:56,970 I'll be explaining this in detail in the next video. 17 00:00:56,970 --> 00:01:01,240 Just realize that when you run any of your code, you write in this section here, 18 00:01:01,240 --> 00:01:05,380 this SQL Playground will show the results here, in the lower section. 19 00:01:07,490 --> 00:01:12,191 Since this is a playground, feel free to play around with any of the code you want. 20 00:01:14,250 --> 00:01:19,361 If you made a mistake and want to go back to the original SQL code hit Reset. 21 00:01:21,160 --> 00:01:26,630 Feel free to pause any of the videos at any point as you use the SQL Playground. 22 00:01:26,630 --> 00:01:31,280 It's also normal to re-watch videos to help you cement what you learn. 23 00:01:31,280 --> 00:01:35,520 If you want to try something out for yourself, click on New Query, and 24 00:01:35,520 --> 00:01:38,470 it will open up a fresh coding area. 25 00:01:38,470 --> 00:01:42,420 You can start something new of your own from scratch. 26 00:01:42,420 --> 00:01:46,100 You can add as many coding areas as you like. 27 00:01:46,100 --> 00:01:50,930 However, when you close SQL Playground, none of your code will be saved. 28 00:01:50,930 --> 00:01:53,650 If you open up SQL Playground again from the video page, 29 00:01:53,650 --> 00:01:56,800 it will reset to the initial state. 30 00:01:56,800 --> 00:02:00,790 If you want to save something, copy and paste it into a safer place. 31 00:02:00,790 --> 00:02:05,180 To explore the database structure, click Database Schema. 32 00:02:05,180 --> 00:02:10,590 This will show you all the tables with their names, number of rows, 33 00:02:12,490 --> 00:02:16,770 their columns, and the date types. 34 00:02:19,030 --> 00:02:21,580 Finally, we have a list of tables. 35 00:02:23,650 --> 00:02:28,185 Clicking on a table will give you an overview of that particular table, 36 00:02:28,185 --> 00:02:35,615 its columns, data types, and its content. 37 00:02:38,273 --> 00:02:42,863 When you're writing SQL code in one of the coding areas, you can press on 38 00:02:42,863 --> 00:02:48,070 the icon on the right of the table name to show the columns in that table. 39 00:02:48,070 --> 00:02:53,390 This is nice because you don't want to click away when writing your code. 40 00:02:53,390 --> 00:02:58,290 You can hover your mouse over the column name, and it shows the data type. 41 00:02:58,290 --> 00:03:01,430 Now this is the environment you'll be laying to use SQL. 42 00:03:01,430 --> 00:03:03,920 But let me show you a couple of quick examples of 43 00:03:03,920 --> 00:03:08,020 other places that you could write SQL in your professional career. 44 00:03:08,020 --> 00:03:13,550 Many companies use third party services like Mode Analytics to generate reports. 45 00:03:13,550 --> 00:03:16,560 See how this area where you can write the SQL code and 46 00:03:16,560 --> 00:03:18,736 the results are shown at the bottom. 47 00:03:21,831 --> 00:03:26,970 If you're a PHP developer, you may come across a tool called phpMyAdmin. 48 00:03:26,970 --> 00:03:31,650 See there's an area for a SQL code, and then you get the results. 49 00:03:31,650 --> 00:03:34,100 And there are countless other tools. 50 00:03:34,100 --> 00:03:36,470 They are all variants on the same theme. 51 00:03:36,470 --> 00:03:38,384 Some have more features than others. 52 00:03:38,384 --> 00:03:44,020 But they all have the same requirement, a knowledge of SQL. 53 00:03:44,020 --> 00:03:47,670 I've included some other examples in the teacher notes. 54 00:03:47,670 --> 00:03:52,260 Remember, every coding video will have its own dedicated SQL Playground. 55 00:03:52,260 --> 00:03:57,370 So when moving from video to video, remember to open up a new SQL Playground.