建立資料庫
create [if not exists] db_name(資料庫名字)
#新增 if not exists,如果已有資料庫,將會提醒,不會出現錯誤;通過 show warnings 檢視錯誤。
[default] character set [=] charset_name(字元編碼,如utf8)
檢視當前伺服器下的資料庫列表
show databases
修改資料庫
alter [db_name]
[default] character set [=] charset_name
刪除資料庫
drop [if exists] db_name
注意:大括號裡面必選,豎線選擇,中括號可選擇
Mysql 運算元據庫
數值 字串 時間日期 null unsigned zerofill auto increment not null or null default create table ifnot exists student id int 4 notnull auto increment comment 學號...
運算元據庫 mysql
問 python操作mysql資料庫,為什麼要在執行後加commit 或者加autocommit true?答 因為在運算元據庫的時候是先在程式中執行sql語句,這種操作並沒有在本地資料庫中更新,當我們只想commit時才會真正更新。問 什麼是遊標?答 遊標,通俗的解釋就是 遊動的標誌 這是資料庫中...
MySQL 運算元據庫
一般在語法格式描述中會使用如下符號 在mysql中,使用create database建立資料庫 語法格式 create database if not exists 資料庫名 default character set 字符集名 default collate 校對規則名 語法說明 在mysql中...