| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/mysql/mysql-test/main/ |
Upload File : |
create table t1(a bit(1), b int auto_increment ,id int, index(a,b)); insert into t1 values(1,null,1); insert into t1 values(1,null,2); insert into t1 values(0,null,3); insert into t1 values(0,null,4); select a+0, b as auto_increment , id from t1 order by id; a+0 auto_increment id 1 1 1 1 2 2 0 1 3 0 2 4 drop table t1; create table t1(a int auto_increment, b bit(5) ,id int, index (b,a)); insert into t1 values(null,b'1',1); insert into t1 values(null,b'1',2); insert into t1 values(null,b'11',3); insert into t1 values(null,b'11',4); select a as auto_increment, b+0, id from t1 order by id; auto_increment b+0 id 1 1 1 2 1 2 1 3 3 2 3 4 drop table t1; create table t1(a bit(1), b int auto_increment , c bit(1) , d bit(1), id int,index(a,c,b,d)); insert into t1 values(1,null,1,1,1); insert into t1 values(1,null,1,1,2); insert into t1 values(0,null,1,1,3); insert into t1 values(1,null,0,1,4); select a+0, b as auto_increment, c+0, d+0, id from t1 order by id; a+0 auto_increment c+0 d+0 id 1 1 1 1 1 1 2 1 1 2 0 1 1 1 3 1 1 0 1 4 drop table t1; CREATE TABLE t1 (b BIT(1), pk INTEGER AUTO_INCREMENT PRIMARY KEY); ALTER TABLE t1 ADD INDEX(b,pk); INSERT INTO t1 VALUES (1,b'1'); ALTER TABLE t1 DROP PRIMARY KEY; select b+0, pk as auto_increment from t1; b+0 auto_increment 1 1 DROP TABLE t1;