2014年6月2日 星期一

Ubuntu Mysql 用法

登入:mysql -u <username> -p

查詢DB:show databases;

使用DB:USE <dbname>;

顯示所有表格:show tables;

查詢Table型態:DESCRIBE test;

Create範例:CREATE TABLE HRFileRecord ( id INT PRIMARY KEY AUTO_INCREMENT,dateinfo TIMESTAMP DEFAULT CURRENT_TIMESTAMP, des VARCHAR(200) , link VARCHAR(200) )  CHARACTER SET = utf8 ;

Insert範例:insert into HRFileRecord (des , link) values ('hello','get this');




沒有留言:

張貼留言