JONG SOON FU BCS15090007 Lab 3 - Database Lab 3 3.1 Mysql...

Info icon This preview shows pages 1–17. Sign up to view the full content.

Database Lab 3 3.1 Mysql Drop table and show the warning
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

3.2 Create and drop Temporary table 3.3.1 Mysql Select statement
Image of page 2
3.3.2 Mysql Select specifying columns statement
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

3.4.1 Mysql WHERE statement
Image of page 4
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

3.4.2 Mysql WHERE condition with logical operators AND and OR
Image of page 6
3.4.3 Test the condition for not only equality but also inequality
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

3.5.1 Select without distinct operator
Image of page 8
3.5.2 select with DISTINCT operator
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

3.5.3 If a column has NULL values and you use the DISTINCT operator for that column, MySQL will keep one NULL value and eliminate the other because the DISTINCT operator treats all NULL values as the same value.
Image of page 10
3.5.4 Use the DISTINCT operator with more than one column. The combination of all columns will be used to define the uniqueness of the row in the result set.
Image of page 11

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

3.5.5 Without the DISTINCT operator, you will get duplicate combination state and city as follows:
Image of page 12
3.5.6 If you use the GROUP BY clause in the SELECT statement without using aggregate functions, the GROUP BY clause will behave like the DISTINCT operator.
Image of page 13

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

3.5.7 The DISTINCT operator is used with the COUNT function to count unique records in a table. In this case, it ignores the NULL values.
Image of page 14
3.6.1 MySQL ORDER BY
Image of page 15

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

3.6.2
Image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '16
  • MYSQL , following query, DISTINCT operator

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern