Home > Database > Mysql Tutorial > body text

sql语句1数据库创建、查看

WBOY
Release: 2016-06-07 15:36:01
Original
1501 people have browsed it

SQL语句从功能上可以区分如下三类: DML(Data Manipulation Language)数据操作语言 |-用于检索和修改数据 DDL(DataDefinition Language)数据定义语言 |-用于创建、修改、删除数据库对象(表,关系、索引、视图) DLC(Data Control Language)数据控制语

SQL语句从功能上可以区分如下三类:

              DML(Data Manipulation Language)数据操作语言

                     |-用于检索和修改数据

              DDL(DataDefinition Language)数据定义语言

                     |-用于创建、修改、删除数据库对象(表,关系、索引、视图)

              DLC(Data Control Language)数据控制语言

                     |-用于定义数据库用户的权限(数据库的管理方面)

数据库创建:

create database db_name

default character set utf-8;

数据库查看:

show databases;
Copy after login

使用数据库:

use db_name;
Copy after login

数据库删除:

drop database if exists db_name;
Copy after login


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template