We are going to discuss about the select statement in SQL. Basically this the select statement is used to select data from the database or from the tables, how you know very well about it because I have already discussed in my previous session, but now I'm defining dB. I'm saying I have show database. So as you can see, I have these databases make sure we are using the union stream database, I am saying SHOW TABLES. So it will show you all the tables in the unity database. As you can see, we have only one table so that's why it's showing one table.
If you have multiple tables in this database, it will show you the multiple tables now empty, I can get I can select all the records. I want to show all the records. I'm saying that select static from this Table students Ctrl Enter. So as you can see, it's showing us four records industrials, tables, static means and things. Show me all the records in this table. It's like English, you're saying select static from students.
That is, you're saying select all the record from students table. Okay? But if you want to show or if you want to view only the SLA, so how can you get only the last name, column, I'm saying here I'm saying as underscore name, your column name goes here. Now from students Ctrl, enter. So you can see it's only showing you the S name. If you are saying that you want to show that s name also with s ID.
So with almost separate, use another column s ID As you can see Ctrl Enter. As you can see, it's showing you the S Id use the S ID as name control. So as you can see first string, the first column, that's why you are using the first column here. And the second column here, if you want to show the city, you can also specify the other column. By separating the comma, Control Enter. Basically, you actually can see it's showing you the also the city.
So it's totally depend upon you, how you need and how you are creating. This is the flag if you are saying Oh, please show me all the columns. So use the static control interface. So you can see it show you all the columns. If you are using the column, which is not available in the table Ctrl Enter so it will give you the error. So it says unknown column Xs s in TVs because x s s column is not available in this table.
So that's why it's giving us an error. So it's really frowned upon. So this is the select statement to selecting all the records from a particular table First of all, if you have another table, so how can you use the table select static that means sorting all the records or all the columns from your x y Zed tables, okay. So I think this is enough for read in the next lecture, we are going to cover some other topics. So thank you for watching.