Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ndb_minmax.result
Package: mysql-4.1.16-win-src.zip [view]
Upload User: romrleung
Upload Date: 2022-05-23
Package Size: 18897k
Code Size: 1k
Category:
MySQL
Development Platform:
Visual C++
- drop table if exists t1, t2;
- CREATE TABLE t1 (
- a int PRIMARY KEY
- ) engine = ndb;
- INSERT INTO t1 VALUES (1);
- INSERT INTO t1 VALUES (2);
- INSERT INTO t1 VALUES (3);
- INSERT INTO t1 VALUES (4);
- INSERT INTO t1 VALUES (5);
- INSERT INTO t1 VALUES (6);
- select MAX(a) from t1;
- MAX(a)
- 6
- select MAX(a) from t1;
- MAX(a)
- 6
- select MAX(a) from t1;
- MAX(a)
- 6
- select MAX(a) from t1;
- MAX(a)
- 6
- select MIN(a) from t1;
- MIN(a)
- 1
- select MIN(a) from t1;
- MIN(a)
- 1
- select MIN(a) from t1;
- MIN(a)
- 1
- select * from t1 order by a;
- a
- 1
- 2
- 3
- 4
- 5
- 6
- select MIN(a) from t1;
- MIN(a)
- 1
- select MAX(a) from t1;
- MAX(a)
- 6
- select MAX(a) from t1;
- MAX(a)
- 6
- select * from t1 order by a;
- a
- 1
- 2
- 3
- 4
- 5
- 6
- drop table t1;
- CREATE TABLE t2 (
- a int PRIMARY KEY,
- b int not null,
- c int not null,
- KEY(b),
- UNIQUE(c)
- ) engine = ndb;
- INSERT INTO t2 VALUES (1, 5, 1);
- INSERT INTO t2 VALUES (2, 2, 7);
- INSERT INTO t2 VALUES (3, 3, 3);
- INSERT INTO t2 VALUES (4, 4, 4);
- INSERT INTO t2 VALUES (5, 5, 5);
- INSERT INTO t2 VALUES (6, 6, 6);
- INSERT INTO t2 VALUES (7, 2, 10);
- INSERT INTO t2 VALUES (8, 10, 2);
- select MAX(a) from t2;
- MAX(a)
- 8
- select MAX(b) from t2;
- MAX(b)
- 10
- select MAX(c) from t2;
- MAX(c)
- 10
- select MIN(a) from t2;
- MIN(a)
- 1
- select MIN(b) from t2;
- MIN(b)
- 2
- select MIN(c) from t2;
- MIN(c)
- 1
- select * from t2 order by a;
- a b c
- 1 5 1
- 2 2 7
- 3 3 3
- 4 4 4
- 5 5 5
- 6 6 6
- 7 2 10
- 8 10 2
- select MIN(b) from t2;
- MIN(b)
- 2
- select MAX(a) from t2;
- MAX(a)
- 8
- select MAX(c) from t2;
- MAX(c)
- 10
- select * from t2 order by a;
- a b c
- 1 5 1
- 2 2 7
- 3 3 3
- 4 4 4
- 5 5 5
- 6 6 6
- 7 2 10
- 8 10 2
- drop table t2;