0% found this document useful (0 votes)
34 views3 pages

Last Minute Revision For IP Board Exam - MySQL

The document provides tips for students taking an informatics practices board exam, including to carefully read questions, write section and question numbers for answers, draw network layouts neatly, and check over the paper before submitting. It also summarizes important concepts for the database SQL section like using semicolons, quoting date and character values, the difference between 0 and NULL, and syntax for various SQL queries including SELECT, WHERE, GROUP BY, HAVING, and ORDER BY clauses. Common single-row and multi-row functions are also listed.

Uploaded by

suhasiyer02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views3 pages

Last Minute Revision For IP Board Exam - MySQL

The document provides tips for students taking an informatics practices board exam, including to carefully read questions, write section and question numbers for answers, draw network layouts neatly, and check over the paper before submitting. It also summarizes important concepts for the database SQL section like using semicolons, quoting date and character values, the difference between 0 and NULL, and syntax for various SQL queries including SELECT, WHERE, GROUP BY, HAVING, and ORDER BY clauses. Common single-row and multi-row functions are also listed.

Uploaded by

suhasiyer02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Last Minute Tips for Informatics Practices Board Exam

• Read and understand the concern of question carefully.


• Do questions Sectionwise and Write correct Section, Question number against the
attempted question.
• Write your answers in presentable form with proper example and output of each SQL
command.
• Draw network layout with pencil and scale.
• Check your paper before submitting that you have attempted all answers and review it
carefully.

UNIT 2 : DATABASE CONCEPTS-SQL(25 marks)


• Do not forget to put semicolon at the end of each SQL Query.
• While giving outputs, do write the column headers mentioned in SELECT command.
• Do not forget to put character and date values in quotes( Both quotes are acceptable ‘’ and “ “)
• Date format is ‘YYYY-MM-DD’ or ‘YYYY/MM/DD’
• 0 means value and NULL means no value (both are different)

• Do remember the syntax of SELECT command:


• SELECT colnames FROM tablename WHERE condition Order by colname asc/desc
• Where clause can contain single row methods not multiple row
• Where clause can be used by group by but not after it
• SELECT colnames FROM tablename WHERE condition GROUP BY colname
• SELECT colnames FROM tablename WHERE condition GROUP BY colname
ORDER BY colname
• SELECT colnames FROM tablename WHERE condition
GROUP BY colname HAVING condition
• SELECT colnames FROM tablename WHERE condition
GROUP BY colname HAVING condition ORDER BY colname
• Identification of group by clause: - as per , according to , wise, by each
• Having clause can be used after group by but not before it.
• Having can contain only the column given in group by or any aggregate method

• For multiple ordering:


• SELECT colnames FROM tablename WHERE condition Order by colname1
asc/desc,colname2 asc/desc;

• Increase and decrease any value- use update command


• Only display in calculation not permanent change- select expression as ‘alias’

• Is null and is not null used to check for blank entries or any value respectively.

• Single row gives single output for single row and multiple rows gives single output for
multiple rows
SINGLE ROW FUNCTIONS:
1. CHAR / STRING FUNCTIONS :
1
• Do not get confuse between substr and instr.
(Substr gives substring and instr gives position of the first occurrence of the substring)
• While giving length of string, do count all the spaces leading, trailing and middle
( space is also counted as character)

2. NUMERIC FUNCTIONS:

3. DATE/TIME FUNCTIONS:

2
• Now() and curdate() does not accept any parameters, rest all methods do accept one or two
parameters.
• Year(), month(), day() gives integer value, Like year(dob)=2002 where dob is date value.

MULTI ROW FUNCTIONS:


Aggregate Descriptions
Function

count() It returns the number of rows, including rows with NULL values in a
group.

sum() It returns the total summed values (Non-NULL) in a set.

average() It returns the average value of an expression.

min() It returns the minimum (lowest) value in a set.

max() It returns the maximum (highest) value in a set.


• Count(*) gives total rows including null values but count(col) gives only non-null values

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy