Branch: C.S.E Subject: Mysql/Dbms Year/Sem: 2 /4: Shri Vaishnav Polytechnic College M.O.G Lines Indore (M.P)
Branch: C.S.E Subject: Mysql/Dbms Year/Sem: 2 /4: Shri Vaishnav Polytechnic College M.O.G Lines Indore (M.P)
BRANCH: C.S.E
SUBJECT: MySQL/DBMS
YEAR/SEM: 2nd/4th
2 Experiment-2: STUDY OF
BASIC SQL STATEMENTS.
4 Experiment-4 STUDY OF
SQL STATEMENTS TO
CREATE TABLE.
7 Experiment-7 : Study of
order by and group by
clause.
8 Experiment-8 : Study of
Data Calculation
9 Experiment-9 : Study of
Pattern Matching
10 Experiment-10 : Study of
SQL functions
11 EXCERSICE : 1
13 (a). Description of
employee.
FOR MODIFY:
Experiment-6 : Study of SQL
statements for retrieving data from
a table.
The SQL commands to retrieve data from table are
1. SELECT ALL DATA : This Command is used to retrieve all the data present in
table.
Syntax : SELECT * FROM TABLE_NAME;
Example :
2. SELECT A ROW : This Command is used to retrieve all the data present in table
of
a given row.
Syntax : SELECT * FROM TABLE_NAME WHERE COLUMN_NAME=VALUE;
Example :
3. MAX( ) – Max function return maximum value from selected column of the
table.
Syntax : SELECT MAX(COLUMN_NAME) FROM TABLE_NAME;
Example :
4. MIN( ) – MIN function return minimum value from selected column of the
table.
Syntax : SELECT MIN(COLUMN_NAME) FROM TABLE_NAME;
Example :
5. SUM( ) – Sum function return total sum of a selected column numeric values .
Syntax : SELECT SUM(COLUMN_NAME) FROM TABLE_NAME;
Example :
SCALAR FUNCTIONS : Scalar function returns a single value from an input value
some
frequently used scalar functions are
UCASE( ) : UCASE function is used to convert value of string column to upper case
character.
Syntax : SELECT UCASE(COLUMN_NAME) FROM TABLE_NAME;
Example :
3. MID( ) : MID function is used to extract sub string from column values of string
type in a table.
Syntax : SELECT MID(COLUMN_NAME) FROM TABLE_NAME;
Example :
EXCERSICE : 1
Part 1 : Create table for employee with different operations .
(a). Description of employee.
(f).Write a query to show the name of employee who lives in city Indore.
Part 2:Create table works where use different operations.
(a).Show the Description of table and use insert into.
Description:
Insert Into:
Part 3 : Create the table for company where use different operations.
(a). Show the Description of table and use insert into.
Description :
Insert Into:
Insert Into:
(c).Write the query to show the record of Manager who’s name start with “A”.
(d). Write the query to show the record of Manager who’s name have letter “R”.
(e). Write the query to show the record of Manager with 7 character.