易截截图软件、单文件、免安装、纯绿色、仅160KB

MySQL运行SQL脚本文件

mysql运行sql脚本文件
3
推荐
建立my.sql文件:
create table mytable(name char(10),id char(4));
用root用户登陆数据库:
E:\mysql\bin>mysql -u root -p password
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 26
Server version: 5.0.37-community-nt MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
更改数据库:
mysql> use mysql;
Database changed
第一种方法:运行该脚本文件:
命令在mysql命令提示符下用,例如:mysql> source my.sql;(这里my.sql要放在data目录下)
Query OK, 0 rows affected (0.08 sec)
第二种方法:运行该脚本文件:
命令在dos命令提示符下用,例如:c:\documents   and   settings\administrator>mysql   -uroot   -p password<my.sql
查看hi表的结构:
mysql> desc mytable;
+-------+----------+------+-----+---------+-------+
| Field | Type     | Null | Key | Default | Extra |
+-------+----------+------+-----+---------+-------+
| name  | char(10) | YES  |     | NULL    |       |
| id    | char(4)  | YES  |     | NULL    |       |
+-------+----------+------+-----+---------+-------+
2 rows in set (0.02 sec)


相关文档:

JAVA连接ACCESS,SQL Server,MySQL,Oracle

import java.sql.*;
/*
* JAVA连接ACCESS,SQL Server,MySQL,Oracle数据库
*
* */
public class JDBC {
  
public static void main(String[] args)throws Exception {
  
   Connection conn=null;
  
       //====连接ACCESS数据库 ......

[收拢] 用sqlite 执行标准 sql 语法

http://www.umgr.com/blog/PostView.aspx?bpId=36294
 1. 执行sql语句
int sqlite3_exec(sqlite3*, const char *sql, sqlite3_callbacksql 语法
, void *,  char **errmsg );
这就是执行一条 sql 语句的函数。
第1个参数不再说了,是前面open函数得到的指针。说了是关键数据结构。
第2个参数const char ......

blog源码整理:php+mysql博客程序25种

Blog系统作为大家最常接触的互联网东东,在站长群体中几乎人手一博,从知名门户的博客频道,到网络营销专家博客,网民对博客的关注度在不断提高并深化。目前网上免费的blog系统太杂,在此整理PHP版的Blog介绍如下:
1、wordpress:http://www.wordpress.org 功能也很全面,应该是支持blog的首选。它有最强的模版功能,已经 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号