Professional Documents
Culture Documents
DBMS 10 Practical
DBMS 10 Practical
DBMS 10 Practical
Practical: - 10
Aim: - To implement convert functions and View statement in MySQL.
(A). now ():- It returns the current date and time as a string or numeric values.
Syntax: - select now ();
Fig 1.1
Fig 1.2
(C) time:- It converts value to time. Format is “HH:MM:SS”.
Date:- it converts value to date. Format is “yyyy-MM-DD.
Fig 1.3
Fig 1.4
Fig 1.5
Fig 1.6
Fig 1.6
(F) UTF 8:- UTF-8 is a variable width encoding that can be represent every character in the
Unicode character set.
Fig 1.7
Fig 1.8
MySQL view:-
A view is a database object that has no values. Its contents are based on the base table. It
contains rows and columns similar to the real table. In MySQL, the View is a virtual
table created by a query by joining one or more tables.
select columns
from tables
where conditions;
Fig 1.9
Maharishi Markandeshwar deemed to be University.
Name:- Raunak mishra Roll No. 11222619
Subject:- Database Management System Lab Course code:- BCSE-510L
Fig 1.10
(C) Drop view:-
Syntax:- drop view view_name;
Fig 1.11
(D) MySQL create view with join clause.
Syntax:- create view view_name
As select columnNames
From table1, table2
Where conditions;
Maharishi Markandeshwar deemed to be University.
Name:- Raunak mishra Roll No. 11222619
Subject:- Database Management System Lab Course code:- BCSE-510L
Fig 1.12