CREATE DATABASE testdb CHARSET=UTF8
創建一個資料庫 名字叫做testdb
USE testdb;
選擇資料庫
CREATE TABLE testTable1( -> id int(11) not null primary key auto_increment, -> username char(16) not null, -> password char(16) not null);
創建一個表 名字為testTable1
第一個欄位名字為 id 最大11個字符 not null 不允許為空 Primary key 設定主鍵 auro_increment,自動增長
第二個欄位名字為username char型最大16個字符 不允許為空
第二個欄位名字為password char型最大16個字符 不允許為空
DROP TABLE testTable1;
DROP DATABASE testdb;
洗掉一個表
洗掉一個資料庫
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/76848.html
標籤:MySQL
上一篇:Win10系統下的MySQL5.7.24版本(解壓版)詳細安裝教程
下一篇:MYSQL的資料型別
