1
00:00:00,970 --> 00:00:09,010
Okay great here we'll apply what we learned in the previous lecture in an exercise in this simple line

2
00:00:09,220 --> 00:00:15,100
we will create a test table with two columns numbers and words.

3
00:00:15,270 --> 00:00:18,420
We've written the code on one line with small letters.

4
00:00:18,420 --> 00:00:28,880
Notice how my Esky will change the color of keywords data types and numbers now we will not be dealing

5
00:00:28,880 --> 00:00:33,140
with an ad hoc software as we are focusing on workbench.

6
00:00:33,140 --> 00:00:39,140
After having placed the cursor somewhere in this query you can press the little brush icon to reformat

7
00:00:39,140 --> 00:00:42,560
the script to do the same operation faster.

8
00:00:42,560 --> 00:00:49,050
Remember that control can be shortcut Wow it worked.

9
00:00:49,080 --> 00:00:54,680
Keywords are in capital letters and the data for each column of the table starts on a new line.

10
00:00:54,690 --> 00:00:57,020
Great.

11
00:00:57,070 --> 00:01:02,710
Imagine you have a further preference regarding the horizontal organization of this code and the alignment

12
00:01:02,770 --> 00:01:04,090
of all data types.

13
00:01:05,600 --> 00:01:11,720
Using the tab button from your keyboard you can set end and var char to begin at the same horizontal

14
00:01:11,720 --> 00:01:12,350
point.

15
00:01:14,180 --> 00:01:15,590
According to some users.

16
00:01:15,680 --> 00:01:19,690
This trick further improves code's readability.

17
00:01:19,700 --> 00:01:22,890
The technical term is called indentation.

18
00:01:23,050 --> 00:01:27,920
We say the column names and their data types were indented to the right.

19
00:01:27,920 --> 00:01:28,700
Amazing

20
00:01:31,200 --> 00:01:35,630
another aspect of maintaining good coding style is using comments.

21
00:01:35,760 --> 00:01:39,230
These are lines of text that workbench will not run as a code.

22
00:01:39,240 --> 00:01:46,030
They convey a message to someone who reads our code technically in my SU Well you can start a comment

23
00:01:46,030 --> 00:01:54,410
by typing a forward slash and a star and close it reciprocally with a star in a forward slash this approach

24
00:01:54,410 --> 00:01:56,420
is used mainly for large comments

25
00:02:03,440 --> 00:02:04,910
for one line comments.

26
00:02:04,910 --> 00:02:08,240
You can use either two dashes or one or more hash signs

27
00:02:13,480 --> 00:02:18,430
in addition to differentiate them from mere code my ask you will work bench marks.

28
00:02:18,430 --> 00:02:20,620
All comments in gray.

29
00:02:20,710 --> 00:02:22,540
Fantastic.

30
00:02:22,540 --> 00:02:29,360
Finally I would like to elaborate on the lightning symbol which helps you execute your code.

31
00:02:29,380 --> 00:02:35,200
Let's start from the fact that your code is separated into blocks as marked by the semi-colon separator

32
00:02:38,320 --> 00:02:39,050
OK.

33
00:02:41,110 --> 00:02:48,040
So if you place your cursor on one block and then press the lightning icon or the control shift enter

34
00:02:48,040 --> 00:02:54,870
combination as well will run the selected and all remaining queries.

35
00:02:54,870 --> 00:03:01,410
That's why if I click on from an execute the code this way I will see the output from the select statement

36
00:03:01,620 --> 00:03:07,140
and will drop the test table.

37
00:03:07,200 --> 00:03:12,760
If you would like to run just the statement under the cursor you must press the adjacent icon where

38
00:03:12,780 --> 00:03:21,770
a lightning and a cursor are depicted in the corresponding keyboard combination is control and enter.

39
00:03:21,860 --> 00:03:27,590
I can promise you will not stop using this keyboard combination until the very end of the Course as

40
00:03:27,590 --> 00:03:34,060
it allows you to see the output of a certain query quickly without having to run the entire Cuil code.

41
00:03:34,610 --> 00:03:37,700
Well I hope you like these two lectures.

42
00:03:37,700 --> 00:03:43,130
They were aimed at making you aware of the notion of clean coding and coding in good style.

43
00:03:43,130 --> 00:03:48,650
We consider these tools essential for good professional coding so we would be happy if you can since

44
00:03:48,650 --> 00:03:52,070
you started building good coding style habits.

45
00:03:52,340 --> 00:03:55,300
Great enough about theory and basics.

46
00:03:55,400 --> 00:03:56,610
In our next video.

47
00:03:56,660 --> 00:04:02,630
We will show you how to load the employees database which is rather big and will serve us for most of

48
00:04:02,630 --> 00:04:06,370
the remaining lectures in the well part of this course.

49
00:04:06,410 --> 00:04:10,250
We will start our data manipulation lessons right after that.

50
00:04:10,400 --> 00:04:11,510
Thank you for watching.

