0% found this document useful (0 votes)
3 views

DBMS

Uploaded by

Mohd Arif
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

DBMS

Uploaded by

Mohd Arif
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Q1) Steps for MYSQL installation.

Step 1 :- Download the MYSQL .exe file from the MYSQL official website.
Step 2 :- Open the downloaded .exe file of the MYSQL server and click install.
Step 3 :- Then follow up the installation procedure show on the screen.
Step 4 :- Wait till the MYSQL server is installed.
Step 5 :- Click on the MYSQL icon which will appear after completion of the
installation process and you are good to go.

Q2) Create database and use it. Also create tables in database.
SQL database or relational database is a collection of highly structured tables, wherein each
row reflects a data entity, and every column defines a specific information field. Relational
databases are built using the structured query language (SQL) to create, store, update, and
retrieve data.

Q3) Insert data in the table and print it.


The INSERT INTO statement is used to insert new records in a table.

Page 1 of 8
Q4) Use select command to display table data.
The SELECT statement is used to select data from a database.

Q5) Update table by editing values.


The UPDATE statement is used to modify the existing records in a table.

Page 2 of 8
Q6) Use where clause.
The WHERE clause is used to filter records. It is used to extract only those records that
full fill a specified condition.

Q7) Use AND, OR and NOT operators.


AND Operator :- The AND operator is used to filter records based on more than one condition, like if
you want to return all customers from Spain that starts with the letter 'G'.

OR Operator :- The OR operator is used to filter records based on more than one condition, like if you
want to return all customers from Germany but also those from Spain.

NOT Operator :- The NOT operator is used in combination with other operators to give the opposite
result, also called the negative result.

Page 3 of 8
Q8) Use order by keyword.
The ORDER BY keyword is used to sort the result-set in ascending or descending order.

Q9) Use delete Statement.


The DELETE statement is used to delete existing records in a table.

Page 4 of 8
Q10) Use limit clause.
The LIMIT clause is used to specify the number of records to return. The LIMIT clause is useful on large
tables with thousands of records. Returning a large number of records can impact performance.

Q11) Use “min” & “max” function.


MIN() Function :- The MIN() function returns the smallest value of the selected column.
MAX() Function :- The MAX() function returns the largest value of the selected column.

Page 5 of 8
Q12) Use “count” , “avg.” & “sum” .
COUNT() Function :- The COUNT() function returns the number of rows that matches a specified
criterion.

AVG() Function :- The AVG() function returns the average value of a numeric column.
SUM() Function :- The SUM() function returns the total sum of a numeric column.

Q13) Use like operator.


The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.
There are two wildcards often used in conjunction with the LIKE operator:
 The percent sign % represents zero, one, or multiple characters
 The underscore sign _ represents one, single character

Page 6 of 8
Q14) Use wildcard characters.
A wildcard character is used to substitute one or more characters in a string. Wildcard characters are
used with the LIKE operator. The LIKE operator is used in a WHERE clause to search for a specified
pattern in a column.

Q15) Use “in” & “between” operators.


IN Operator :- The IN operator allows you to specify multiple values in a WHERE clause.
The IN operator is a shorthand for multiple OR conditions.

Between Operator :- The BETWEEN operator selects values within a given range. The values can be
numbers, text, or dates.
The BETWEEN operator is inclusive: begin and end values are included.

Page 7 of 8
Q16) Use MYSQL aliases.
SQL aliases are used to give a table, or a column in a table, a temporary name.
An alias only exists for the duration of that query.
An alias is created with the AS keyword.

Q17) Use joins.


A JOIN clause is used to combine rows from two or more tables, based on a related column between
them.

Page 8 of 8

You might also like