** most value ** you need through comparison **.The process of selecting the sorting method is to ** compare, select the most valuable element in each round, and then exchange it with the most advanced element in this round **, therefore, the key of this algorithm is to record the results of each comparison, that is, the maximum position (subscript) after each comparison ).Let's take a look at the process of selecting sorting:Array sorting Top 7 23 12 4 33 21 2 17 13 9First round cycle 2 23 12
1. Numerical functionsfunction return value sample displayCeil (n) the smallest integer greater than or equal to the value N, SELECT ceil (10.6) from TABLE_NAME; 11Floor (n) the largest integer less than or equal to the value N, SELECT floor (10.6) from TABLE_NAME; 10MOD (M,n) m divided by the remainder of N, and if n=0, returns M SELECT MOD (7,5) from table_name l; 2Power (M,n) m's N-order SELECT POWER (3,2) from table_name; 9ROUND (n,m) rounds N, re
In is equal to any member in the brackets, such as select * from dept where deptno in ('10', '20', '30', '40 ');Not in is not equal to any member in the brackets, such as select * from dept where deptno not in ('10', '20', '30', '40 ');Between A and B is greater than or equal to A and less than or equal to B, such as select * from emp where sal beteen 1000 and 1500;Not between A and B is not greater than or equal to A and less than or equal to B, such as select * from emp where sal beteen 1000 a
Tags: blog http io ar using SP for data onOriginal: MySQL stored procedures and common functionsA. function1. Mathematical FunctionsCeil () into a roundingSELECT ceil (1.2); 2Floor () Rounding and roundingSELECT floor (1.9); 9MoD take remainder (modulo)SELECT MOD (3,8); 3--3 to 8 moduloPower () Power operationSELECT POWER (3,2); 9ROUND () roundingSELECT ROUND (123.456,2); 123.46Trunctate Digital InterceptSELECT TRUNCATE (123.456,2); 123.45ABS () Take
Tags: mysql learning programmerA. function1. Mathematical FunctionsCeil () into a roundingSELECT ceil (1.2); 2Floor () Rounding and roundingSELECT floor (1.9); 9MoD take remainder (modulo)SELECT MOD (3,8); 3--3 to 8 moduloPower () Power operationSELECT POWER (3,2); 9ROUND () roundingSELECT ROUND (123.456,2); 123.46Trunctate Digital InterceptSELECT TRUNCATE (123.456,2); 123.45ABS () Take absolute valueSELECT ABS (-123); 123Pi () πSELECT PI (); 3.14RAND
A. function1. Mathematical FunctionsCeil () into a roundingSELECT ceil (1.2); 2Floor () Rounding and roundingSELECT floor (1.9); 9MoD take remainder (modulo)SELECT MOD (3,8); 3--3 to 8 moduloPower () Power operationSELECT POWER (3,2); 9ROUND () roundingSELECT ROUND (123.456,2); 123.46Trunctate Digital InterceptSELECT TRUNCATE (123.456,2); 123.45ABS () Take absolute valueSELECT ABS (-123); 123Pi () πSELECT PI (); 3.14RAND () and rand (X)SELECT RAND ();
function return value sample displayCeil (n) the smallest integer greater than or equal to the value N, SELECT ceil (10.6) from TABLE_NAME; 11Floor (n) the largest integer less than or equal to the value N, SELECT floor (10.6) from TABLE_NAME; 10MOD (M,n) m divided by the remainder of N, and if n=0, returns M SELECT MOD (7,5) from table_name l; 2Power (M,n) m's N-order SELECT POWER (3,2) from table_name; 9ROUND (n,m) rounds N, retains the M-bit SELECT
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.