Hello guys, I am Shahzad and welcome election number 26. Today we are going to discuss about the SQL security basically SQL Server query is a query within a query. So you always enclosed with the parenthesis like this before using any security you have to use this use of purity. Yeah, let's suppose you have some subjects. So as you can see, you have two subjects in your subject table. And the student enrolled in the courses are the subjects as you can see, this is student H, and H enrolled in the PHP and also the Java.
Now you want to fetch all the student informations, those informations or those students information, informations, which already enrolled. In course, that means I I'm saying select static from students, fine, you can also get this one. But for now, I'm saying, I also need the subject count. So I'm saying select. So this is the security syntax. Now I'm saying select count.
And now I'm counting the subjects that how many courses a particular students enrolled. Now I'm saying si D, which is a subject ID. And I'm saying from subject, I'm saying where s ID, which is the student s ID equals to subject dot student ID. Now, I'm saying f courses, hit the enter button. So now as you can see, it's showing us that john enrolled into horses so as you can see, these are the two horses and the LX enrolled in one courses and the other persons enrolled the zero that means it's showing the zero. So, this is the security to now you have a syntax You can also write your columns here, you need the specific column, you have to write your specific column here or you can also use a static okay.
So shortly depend upon you. And this is the security security can return individual values or a list of records and also securities are nested queries that provide data to the including Curie. So, this is the nested This is also called the nested query because you are writing the query here. And within the query you also have another query. So, This is the security. So I hope you are enjoying the series.
In the next lecture we are going to cover some of the things. Thank you for watching