Basic commands in SQL (Structured Query Language)
- Creating the database
To create a new database, so it does not apply if the database already exists or you do not have the privilege.
The syntax is:
CREATE DATABASE nama_db - Delete database
To delete the database and all tables in it. This command does not apply if the database does not exist or you do not have the privilege.
The syntax is:
DROP DATABASE nama_db - Using the database
To make the default database and references from the table that you will use. This command does not apply if the database does not exist or you do not have the privilege.
The syntax is:
USE nama_db - Displays database
To display the list in the current system.
The syntax is:
SHOW DATABASE - Making table
To create a table you have to specify at least name and type of columns you want.
The simplest syntax (without any other definition) is:
CREATE TABLE nama_tbl(Kolom1 tipekolom1 (), kolom2 tipekolom2 (), ...)
0 komentar :
Post a Comment