MySQL执行外部sql脚本
生活随笔
收集整理的這篇文章主要介紹了
MySQL执行外部sql脚本
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1:~/mysql_test/test.sql
1 create table student(2 sno int not null primary key auto_increment,3 sname varchar(20) not null4 ) engine=MyISAM default charset=utf8;2:在控制臺下執行。mysql> source ~/mysql_test/test.sql
Query OK, 0 rows affected (0.07 sec)
?
3:顯示表student 的建表語句:mysql> show create table student\G
*************************** 1. row ***************************
Table: student
Create Table: CREATE TABLE `student` (
`sno` int(11) NOT NULL AUTO_INCREMENT,
`sname` varchar(20) NOT NULL,
PRIMARY KEY (`sno`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
轉載于:https://www.cnblogs.com/yshyee/p/3365269.html
總結
以上是生活随笔為你收集整理的MySQL执行外部sql脚本的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 心得3
- 下一篇: POJ3267The Cow Lexic