YOUR AD GOES HERE

04 MySQL Tutorial for Beginners: USE, SELECT, result set, DISTINCT, ALL

Published 02, Nov 2015

golearnfast


Description:
In this video you will begin to code your first "SQL statements" in MySQL Workbench.
The very first thing you need to do is to choose and select a database.
The "USE statement" is the one you’re going to need for this purpose, and it's the very first statement you're going to learn.

The second statement you're going to learn is the "SELECT statement" which is used to retrieve data from a base table.
You code the SELECT keyword followed by a list of column names separated by commas and the FROM keyword followed by the name of the base table from which the query retrieves the data.

A "result set" is a table of data resulted from a statement: you can think of it as a temporary table that's created within a database.
Note that when you execute a USE statement alone, you do not get any results back, because a USE statement itself does not expect to have any results back.
In the SELECT clause, you can code an asterisk as a shorthand to indicate that all of the rows and columns should be retrieved.

By default, all of the rows in the base table are included in the result set.
In some cases, that means that the result set will contain duplicate rows, or rows whose column values are identical.
If that's not what you want, you can include the DISTINCT keyword in the SELECT clause to eliminate the duplicate rows.

The DISTINCT keyword prevents duplicate rows from being included in the result set.
The ALL keyword causes all rows matching the search condition to be included in the result set, regardless of whether rows are duplicated. The ALL keyword is the default and can therefore be omitted.

EXERCISES for your SELF-TRAINING:
http://golearnfast.com/Quizzes.php?_SelectSmallerGroup_279=0&Lessons_ID=279

SCRIPT FOR THE EXAMPLES:
http://www.golearnfast.com/files/lessons_material/lesson_277_1440544998.sql

SUBSCRIBE!
https://www.youtube.com/channel/UCMEaGDoHU7c9tWyafZ9vC6Q?sub_confirmation=1

FACEBOOK
https://www.facebook.com/golearnfast

GOOGLE+
https://plus.google.com/u/0/b/101326338689489366802/

Releted More Videos

  • Sorry!!! Nothing to show

You May Also Like

YOUR AD GOES HERE

YOUR AD GOES HERE