char 以及varchar 都是用來儲存字元 , 字串的type ,
不同點在於 , char在儲存時是固定長度 , 而varchar則是可以變動長度來進行儲存(但不可大於我們所設的limit)
varchar stands for "Variation Character" .
舉例來說 , 假使我們要儲存 "hello"這個word , 而在char與varchar的limit都設定為10個bytes ,
JerryCheng 發表在 痞客邦 留言(0) 人氣(35)
MySQL is a Relational SQL database management system , and it is open source software.
Relational database means that all the data is stored into different tables
and relations are established using primary keys or other keys known as foreign keys.
JerryCheng 發表在 痞客邦 留言(0) 人氣(7)

SQL stands for Structured Query Language , it is a database computer language
designed for retrieval and management of data in relational database.
All relational database management system like MySQL , MS Access , Oracle , and SQL server use SQL
JerryCheng 發表在 痞客邦 留言(0) 人氣(17)
在database中 , 我們通常會需要設定一個key來做為每個紀錄的辨識 ,
而這樣的key , 我們就稱為Primary key.
Primary可以一個 , 也可以多個欄位聯合來做為一個Primary key.
在MySql中 , Primary key的設定如下:
JerryCheng 發表在 痞客邦 留言(0) 人氣(547)
First , we must connect to database by using root account.
# mysql -u root -p
Then , we can create a new account for other people.
mysql> grant all privileges on Mydb.* to user01@localhost IDENTIFIED BY '12345678' ;
JerryCheng 發表在 痞客邦 留言(0) 人氣(24)
修改Mysql的密碼 , 主要有以下兩個步驟 ,
1 . 連線Mysql
#mysql -u root -p root // user為root , password為root
(若只輸入#mysql -u root -p , 則登入後會詢問密碼)
JerryCheng 發表在 痞客邦 留言(0) 人氣(920)
1. in ,
example : select * from monday where category in('3')
選出在monday這個資料表中category = 3 的資料.
JerryCheng 發表在 痞客邦 留言(0) 人氣(18)