Fix SQL Error

This commit is contained in:
vCaesar
2016-12-09 01:18:48 +08:00
parent 8d7accd78c
commit ba5d160a9c
3 changed files with 19 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ Go中支持MySQL的驱动目前比较多有如下几种有些是支持data
`departname` VARCHAR(64) NULL DEFAULT NULL,
`created` DATE NULL DEFAULT NULL,
PRIMARY KEY (`uid`)
)
);
CREATE TABLE `userdetail` (
`uid` INT(10) NOT NULL DEFAULT '0',
@@ -33,6 +33,7 @@ Go中支持MySQL的驱动目前比较多有如下几种有些是支持data
)
如下示例将示范如何使用database/sql接口对数据库表进行增删改查操作
```Go
package main
@@ -108,7 +109,8 @@ Go中支持MySQL的驱动目前比较多有如下几种有些是支持data
panic(err)
}
}
```
通过上面的代码我们可以看出Go操作Mysql数据库是很方便的。