mysql
vincent-fan
Starry starry night
展开
-
[C调用Mysql存储过程] 示例一
1. 数据库名:test ;表名:chengjibiao;字段:Id int , Name char , English int , Maths int , Physis int ;2. 存储过程:DELIMITER $$DROP PROCEDURE IF EXISTS `test`.`query` $$CREATE DEFINER=`root`@`localhost转载 2013-12-18 09:12:32 · 224 阅读 · 0 评论 -
[C调用Mysql存储过程] 示例二
#include "stdio.h"#include "stdlib.h"#include "string.h"#include "/usr/include/mysql/mysql.h"#include "/usr/include/mysql/mysql_version.h"#include "/usr/include/mysql/errmsg.h"int main( int argc转载 2013-12-18 09:23:35 · 273 阅读 · 0 评论 -
[mysql存储过程] mysql存储过程语法及实例
存储过程如同一门程序设计语言,同样包含了数据类型、流程控制、输入和输出和它自己的函数库。--------------------基本语法--------------------一.创建存储过程create procedure sp_name()begin.........end二.调用存储过程1.基本语法:call sp_name()注意:存储过转载 2013-12-19 17:20:12 · 221 阅读 · 0 评论 -
[MySQL基础] Index详解
MySQL Index一、SHOW INDEX会返回以下字段1、Table 表的名称。 2、 Non_unique 如果索引不能包括重复词,则为0,如果可以则为1。3、 Key_name 索引的名称4、 Seq_in_index 索引中的列序列号,从1开始。5、 Column_name 列名称。6、 Collation 列以什么方式存储在索引中。在MySQL中,有值‘A转载 2013-12-21 23:51:17 · 281 阅读 · 0 评论 -
[mysql存储过程] mysql存储过程使用详解
例1、一个简单存储过程游标实例 代码如下: DELIMITER $$ DROP PROCEDURE IF EXISTS getUserInfo $$ CREATE PROCEDURE getUserInfo(in date_day datetime) -- -- 实例 -- 存储过程名为:getUserInfo -- 参数为:date_day日期格式:2008转载 2013-12-21 22:50:22 · 222 阅读 · 0 评论 -
[MySQL基础] 游标使用
create table test.level (name varchar(20));Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> /*初始化*/ drop procedure if exists useCursor // /*转载 2013-12-22 22:33:52 · 232 阅读 · 0 评论 -
[linux C连接Mysql数据库]
1.首先要找到mysql.h头文件的位置/usr/include/mysql(使用命令 where is mysql 可以找到mysql安装的位置)2.源文件的编译方法 1.先编译 gcc -o connect mysql2.c -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient (mysql -lmysql转载 2014-03-07 15:02:51 · 293 阅读 · 0 评论