You are on page 1of 8

DATABASE MANAJEMEN

NAMA : Joshua Dheary B


NPM : 2113191065
PRODI / KELAS : IF A2

1. Letakan File SQL Ke C:\

Ketikan Windows+R lalu masukan perintah berikut

.
Masukan perintah c:\mysqlsampledatabase.sql untuk mengimport database

Ketikkan perintah show tables untuk menampilkan struktur tables


Tahap 2- MySQL CREATE VIEW
1. Creating a simple view example
2. Creating a view based on another view example

Now, you can query the data from the bigSalesOrder view as follows:
3. Creating a view with join example
This statement selects data from the customerOrders view:

4. Creating a view with a subquery example


This query data from the aboveAvgProducts is simple as follows:

5. Creating a view with explicit view columns example


This statement uses the CREATE VIEW statement to create a new view based on the
customers and orders tables with explicit view columns:
This query returns data from the customerOrderStats view:

You might also like