Java學習之路 mySQL

2021-09-22 16:46:35 字數 878 閱讀 4019

命令列:

create database 資料庫名;

use 資料庫名;

drop database 資料庫名;

建立表:

create table 表名 (

屬性1  型別,

屬性2  型別,

顯示所有存在的表:

show tables;

顯示特定表的格式(即有什麼屬性):

describe 表名;

插入一項資料:

insert into 表名

values ('屬性1值','屬性2值',...);

選擇:select (distinct) 列名1,列名2,... from 表名 where ... and/or ... order by 屬性1,屬性2,...;   (去掉重複項)

更新:update 表名 set 要改的屬性名 = '更新值' where 檢索屬性名 = '檢索值';

mysql時區出現問題:資料庫和**都要改:

重點:gmt%2b8

乙個小坑:

ubuntu mysql:mysql -u root -p   以使用者root進入資料庫

mysql學習之路

linux 命令 yum install y mysql server mysql devel mysql重啟 etc init.d.mysql restart 建立資料庫 create database db demo 刪除資料庫 drop database db drop database db...

java學習之路(四)

string phone 13528283535 檢測是否是手機號 system.out.println phone.matches 13 15 18 d string a b string b 1 string c string d ac1 string e ab string f abc 表示可...

JAVA學習之路(馬士兵)

可以到各種招聘的 上查詢資訊 可以到google上查詢招聘的 例如 以及csdn的招聘頻道等 還有乙個 也不錯,綜合了各大招聘 的資料。這些資料都是最真實不摻假的原始資料,你可以每隔一段時間搜尋一次,一些規律就會被總結出來了。比如說我在 indexpage smartquestion.aspx 磨刀...