ITPUB个人空间 »
itpubkumao的个人空间
欢迎访问 itpubkumao 的个人空间
我的论坛主题
-
2008-03-27 15:54:17 / MySQL及其它开源数据库
我试下来好像是一样的。在Session A加锁后,Session B都是可以select,update和delete等待。没看出来有什么区别啊!谢谢!
查看(362)
评论(6)
-
2008-03-27 08:36:51 / MySQL及其它开源数据库
碰巧看到这个函数,可是不会用[root@localhost mysql]# pwd/var/lib/mysql[root@localhost mysql]# more abc.txtabcabcabc[root@localhost mysql]# mysql -u test -p testEnter password:Welcome to the MySQL monitor.Commands end with ; or \g.Your MySQL connection id is 5Server version: 5.0.51a-community-log MySQL Community Edition (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> select load_file('/var/lib/mysql/abc.txt');+------------------------
查看(295)
评论(5)
-
2008-03-26 15:35:23 / MySQL及其它开源数据库
1. 为什么MySQL要把创建trigger的权限设得这么高?2. BDB引擎也支持事务安全,为什么似乎没有InnoDB引擎用的多呢?谢谢!
查看(269)
评论(4)
-
2008-03-26 09:02:19 / MySQL及其它开源数据库
好像所有的MySQL工具都没有trigger选项的,奇怪吧~~~~~[ 本帖最后由 itpubkumao 于 2008-3-26 09:35 编辑 ]
查看(281)
评论(5)
-
2008-03-25 09:50:26 / MySQL及其它开源数据库
情况如下:mysql> create table t (c1 integer check (c1 < 50));Query OK, 0 rows affected (0.03 sec)mysql> insert into t values(20);Query OK, 1 row affected (0.00 sec)mysql> insert into t values(60);Query OK, 1 row affected (0.00 sec)mysql> select * from t;+------+| c1|+------+|20 ||60 |+------+2 rows in set (0.00 sec)怎么回事?谢谢!
查看(308)
评论(4)
-
2008-03-25 08:12:06 / MySQL及其它开源数据库
下面是MySQL5.1参考手册里光标的例子,有个地方没明白是什么意思,请大侠说说,谢谢!CREATE PROCEDURE curdemo()BEGINDECLARE done INT DEFAULT 0;DECLARE a CHAR(16);DECLARE b,c INT;DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1;DECLARE cur2 CURSOR FOR SELECT i FROM test.t2;DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;OPEN cur1;OPEN cur2;REPEATFETCH cur1 INTO a, b;FETCH cur2 INTO c;IF NOT done THEN
查看(398)
评论(5)
-
2008-03-24 15:27:31 / MySQL及其它开源数据库
MySQL的SP有游标和动态SQL,那有没有两者相结合的动态游标?我自己瞎试了两次,都报错了。-- drop procedure t;delimiter $create procedure t(in ts integer)begindeclare c_1 cursor for select * from abc limit ?;open c_1 using ts;close c_1;end $delimiter ;-- drop procedure t;delimiter $create procedure t(in ts integer)beginset @sql=concat('select * from abc limit',cast(ts as char));declare c_1 cursor for @sql;open c_1 using ts;close c_1;end $del
查看(312)
评论(4)
-
2008-03-24 11:25:20 / MySQL及其它开源数据库
同一个账号,两个函数返回的结果是一样,不同账号,两个函数返回的结果也是一样,就没有什么区别吗?[root@localhost ~]# mysql -u root -pEnter password:Welcome to the MySQL monitor.Commands end with ; or \g.Your MySQL connection id is 26Server version: 5.0.51a-community-log MySQL Community Edition (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.mysql> select user();+----------------+| user()|+----------------+| root@localhost |+-------------
查看(290)
评论(6)
-
2008-03-24 11:18:13 / MySQL及其它开源数据库
情况如下:mysql> create table t (c1 integer auto_increment primary key);Query OK, 0 rows affected (0.02 sec)mysql> select last_insert_id();+------------------+| last_insert_id() |+------------------+|0 |+------------------+1 row in set (0.00 sec)mysql> insert t value();Query OK, 1 row affected (0.01 sec)mysql> select * from t;+----+| c1 |+----+|1 |+----+1 row in set (0.00 sec)mysql> select last_insert_id();+------------------
查看(783)
评论(20)