Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
WEBVTT
00:00.120 --> 00:05.910
I great you Once again, we're going to show you how to select. We're going to learn the select statement
00:05.910 --> 00:13.020
We goping to see how we can select data in the database as we created a database, we created tables, then we
00:13.020 --> 00:17.250
need to see how to retrieve the data, how to see data from database.
00:17.280 --> 00:18.820
How we are going to get that data from database
00:19.290 --> 00:22.050
So we're going to use the statement called Select.
00:22.500 --> 00:25.760
We're going to see many types of selection.
00:26.130 --> 00:30.590
But I'm going to show you an example of what we're going to do.
00:31.140 --> 00:33.060
It's a point of sale, as I told you.
00:33.060 --> 00:37.440
I'm going to show you why we click on Beverage and we get like, non alcohol.
00:37.920 --> 00:44.850
When we click on the button food, we get like a small food, like pizza.
00:44.850 --> 00:46.710
We get like seafood.
00:46.710 --> 00:49.650
We get gasby... why and how we get those kind of beverage?
00:49.980 --> 00:54.030
Why by clicking some place, we get more options.
00:54.600 --> 00:56.850
All of that it is because of the selection statement.
00:56.850 --> 00:59.730
We are selecting things from the database.
01:00.030 --> 01:05.910
It's that we are going to show you how to do selection of things. ==> write Select
01:05.910 --> 01:10.110
Star then From, then the name of the table.
01:10.530 --> 01:14.340
That command will show you all data which is at the table.
01:16.890 --> 01:22.110
Let's write it. Right-click on the table, then you click select, for example.
01:22.140 --> 01:27.920
Select top 1000, it will show you all the data which is in the database.
01:27.930 --> 01:31.380
But the top 1000.
01:31.380 --> 01:34.910
We don't need to write like top 1000.
01:34.920 --> 01:42.180
We can do it in our own way, it means all the data which is in the database, not only like the way
01:42.180 --> 01:46.110
it's written, like the automatic query which is given by the system.
01:46.260 --> 01:56.280
We can write our own statement so we can write like select staff from table name.
01:56.490 --> 02:00.160
Then we will get all data which is in that table.
02:01.320 --> 02:05.220
Let let me show you the data which is in the table.
02:06.430 --> 02:08.890
We need to make sure there is no space between.
02:10.050 --> 02:20.160
So we write select, space, from, then the database name and the table name.
02:20.530 --> 02:27.540
If you click execute, it will show you all data which is in the database, like here you can see we have
02:27.930 --> 02:29.310
first button.
02:29.350 --> 02:37.080
It shows Beverage, it shows food, wine.
02:37.860 --> 02:40.290
All of this is like what I showed you in buttons
02:40.290 --> 02:47.850
What showed you in buttons in the database, when I click on "Make Order", when I click on "Beverage",
02:47.850 --> 02:50.880
it shows me all the beverage we have.
02:51.360 --> 02:55.260
If I click on "food", it shows me all the categories of food we have.
02:55.260 --> 02:59.130
If I click on "wine", it shows me all wines we have.
02:59.430 --> 03:02.220
That is a selection option we are using.
03:03.420 --> 03:03.810
Right-click
03:03.810 --> 03:12.350
on the table, then you click on Select like top thousand or edit 200 rows.
03:12.350 --> 03:15.300
I told you, you can add more data, and also
03:15.300 --> 03:20.040
It helps you to see or to show the data you have in the database.
03:20.250 --> 03:26.970
You can edit it from there, you can add data from there and you can select also from that command.
03:28.590 --> 03:31.230
It's the command select all from the database.
03:31.230 --> 03:37.410
But there are many command you can use to select data from the database, which we are going to see.
03:38.910 --> 03:48.750
For example, there is a command: select all from the table where...
03:48.750 --> 03:57.390
For example, when I click like beverage, I select All from the Table where the name of the column
03:57.390 --> 03:59.250
is Beverage.
03:59.250 --> 04:07.770
I'm going to show it in detail, in more detailS, because we have a lot of things which talk about selection.
04:08.610 --> 04:12.030
I'm going to show you how to do selection.
04:16.930 --> 04:24.890
Select all from table name, you write for example: select star from first category menu,
04:24.910 --> 04:31.390
this command will show you all first category, menu items which are saved in the table
04:31.630 --> 04:38.650
It will show you all of that, we can select by specifying what we going to select in the database.
04:38.650 --> 04:46.270
For example, here in the table, third category menu, we're going to select only quantity price and
04:46.270 --> 04:47.740
the third button menu.
04:47.920 --> 04:52.720
It's another culomn which is in the category menu table.
04:53.320 --> 05:00.780
We can say for example let me select only the quantity, price, the button menu where second button menu equal,
05:00.790 --> 05:02.380
for example: "beverage".
05:02.680 --> 05:10.840
Then it will give you all price, quantity, all third button menu where the second button menu equal
05:11.740 --> 05:14.210
food, wine, things like that.
05:14.210 --> 05:21.190
That's why you could see when I click on the button, it gives sub menu
05:21.310 --> 05:31.510
sub items which are in that menu, or from table or you can select all from the table where there
05:31.510 --> 05:32.470
is a condition.
05:33.550 --> 05:37.270
Now you can see you can select a specific item in the table.
05:38.350 --> 05:45.280
And also there is another one, another statement which is: select top price from the third category
05:45.280 --> 05:45.730
menu.
05:46.330 --> 05:51.940
It means you only select the top price from the third category menu, It means which is a high price.
05:53.260 --> 05:54.940
You can also do that selection.
05:55.960 --> 06:00.710
We're going to see many selection because we are going to learn about views and
06:00.730 --> 06:02.470
We are going see
06:02.470 --> 06:07.480
We're going to talk a lot about selection in views.
06:07.480 --> 06:09.460
View is only selection statement.
06:09.640 --> 06:14.080
It's only showing data from the database.
06:14.080 --> 06:18.070
So we're going to talk a lot in views in the select statement.
06:18.080 --> 06:20.440
I'm going to talk a lot about selection.
06:20.590 --> 06:25.030
I thank you so much for your attention and I hope you are enjoying this course.
06:25.030 --> 06:29.380
Remember to rate our course and to rwite a comment so we can know how to improve this course.
06:29.770 --> 06:31.210
I thank you once again.
06:31.210 --> 06:33.220
And see you on the next lecture.7043
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.