Look at the data sheet

SHOW TABLE;

Look at the detailed structure of the data table

SHOW CREATE TABLE  Table name \G;

Create data table

CREATE TABLE Table name ( Data name type , Data name 1   type 2);

 CREATE TABLE department (
d_id INT(10) ,
d_name VARCHAR(20) ,
function VARCHAR(20) ,
address VARCHAR(30)
);

Delete data table

DROP TABLE Table name ;

Modify data sheet

  • Modify data table name        ALTER TABLE The old name of the table RENAME The new name of the table
  • Modify property name           ALTER TABLE Table name CHANGE The old name of the table   New property name     data type
  • Modify attribute data type   ALTER TABLE Table name MODIFY   Property name   data type
  • Add a property        ALTER TABLE   Table name  ADD   Property name   data type
  • Delete attribute        ALTER TABLE  Table name   DROP   attribute

MySQL More related articles on the data table of basic learning

  1. MySQL Basic knowledge of database Data sheet

    1. database structure library surface data 2. sql(structured query language) Structured query language Management database Management table Management data 3. database Additions and deletions increase create database  ...

  2. MySQL Data query of basic learning

    General inquiry SELECT * FROM Table name SELECT Property name  FROM   Table name Conditions of the query SELECT Property name FROM Table name  WHERE Conditional expression Query data values 1, Data values 2 Form for SELEC ...

  3. mysql Basic operations on Library tables

    original text :mysql Basic operations on Library tables Take a look at all the Libraries , What do I do ? Mysql>Show databases; Select library statement : Use  Library name Create a database : create database  Database name  [ ...

  4. mysql Change the character set of an existing data table , Keep the original data content

    mysql Change the character set of an existing data table , Keep the original data content     Original website :http://blog.csdn.net/learn_2/article/details/6460370 Environmental Science : Not at the beginning of the application ...

  5. MySQL Determine whether the database and data table exist

    MySQL Determine whether the database and data table exist How to use SQL Query statement , Determine whether the database and data table exist ? 1. Determine whether the database exists Inquire about SQL as follows : select * from information_schema ...

  6. django Study -10.django Connect mysql Database and create data table

    1.django Model Django It provides good support for all kinds of databases , Include :PostgreSQL.MySQL.SQLite.Oracle. Django For these databases to provide a unified call API. We can do it on our own ...

  7. python The old boy of learning python The ninth issue of the whole stack _ database day001 Summary of knowledge points —— MySQL Operate databases and data tables 、 Basic data type 、 Basically add, delete, change and check 、 Foreign key definition and creation

    One . Study SQL Statement rules and foreign keys 1. Operation folder create database db2; Create folder create database db2 default charset utf8; Create folder ...

  8. MySQL Learning notes -- Basic operation of data table

    A database is a container that can hold database objects , Database objects include : surface . View . stored procedure . function . trigger . event . among , Table is the most basic element of database , Is a prerequisite for other database objects . A column in a table is called a field , A line is called a record . 1 ...

  9. MySQL Study 3 - Operation of data table

    This section grasps One . Storage engine ( understand ) Two .mysql Supported storage engines 1.InnoDB Storage engine 2.MyISAM Storage engine 3.NDB Storage engine 4.Memory Storage engine 5.Infobright Storage index ...

Random recommendation

  1. C# adopt WatiN Operation page embedded in Iframe

    adopt WatiN.Core.Broswer.Frame() Method to get iframe object , And then the container is frame, And then operate . The following example is login QQ Spatial : Frame frame = browser. ...

  2. Prelude to formal work —— One Java Programmer's internship summary (1)

    Before you know it , It's been three weeks since I went to Shenzhen for my internship . It's different from three and a half months' internship in summer vacation , This time we got more , Feel better , I got rid of the shadow of that internship ( This will be said later ). On zhihu , There is such a problem , You want to talk to you when you first worked ...

  3. To write html A few tips on code

    1.DOCTYPE explain : Tell the browser which specification to use to interpret the content of the document : <!DOCTYPE html PUBLIC "-W3//DTD//XHTML 1.0  Transitional// ...

  4. [Reprint]c++ in typename and class What's the difference

    stay c++Template in , It's used in many places typename And class These two keywords , And it seems to be replaceable , Are these two keywords exactly the same ?   Believe in learning C++ Right class This keyword is very clear ,clas ...

  5. JSON,JSONP

    http://blog.csdn.net/huaishuming/article/details/40046729 explain : Doing it 2 When transferring values between two systems : Cross source request blocked : The same origin policy does not allow reading http: ...

  6. ZhuSuan It's based on Tensorflow Bayesian deep learning on python library

    ZhuSuan It's based on Tensorflow Bayesian deep learning on python library . It is different from the existing deep learning library designed mainly for supervision tasks ,ZhuSuan The characteristic of Bayesian reasoning is that it goes deep into Bayesian reasoning , So as to support various generation modes : Pass on ...

  7. Brief description ADO Abstract data providers that use interfaces in and ADO.NET Data provider factory model

    How to be in ADO Abstract data providers that use interfaces in stay cofig in appSettings Next , Configure the data connection type <appSettings> <!-- This key value maps to one of the enumeration values --> ...

  8. linux samba Create a shared folder

    sudo  apt-get install samba 1.  mkdir  /home/lgs/samba_share    (/home/lgs For your home directory ) 2.  find    -name ...

  9. thinkphp 3.2.1 URL Case problem Here are some details

    The problem assumes that the method is /Admin/User/addUser, After debugging is turned off , All of them become lowercase when they visit again :/admin/user/adduser1. my APP_DEBUG Is turned off 2. The program is in win normal , Put it in linu ...

  10. sprint Two It's a standing meeting 8

    Today, we have a user trial of the software , I asked some students to try out the software and gave some suggestions , In this way, we can further optimize it to a certain extent .