- 浏览: 107576 次
- 性别:
- 来自: 厦门
文章分类
最新评论
-
u011404046:
又是这种坑人的代码,,这只是获取别人的定位信息而已,如果get ...
Android GPS定位 -
pulove:
很好,YEYE
Android GPS定位 -
jianai115:
亲,看不懂啊,源代码可以发一下吗?1003862555@qq. ...
Android GPS定位
MySQL的预定义字符一直没有认真去研究过,结果前几天写数据库的时候出问题了……ORZ……如果要用这些字符,必须如下方法
CREATE TABLE `interval` (begin INT, end INT);
CREATE TABLE mydb.interval (begin INT, end INT);
创建表格的时候系统没有报错,但是做SQL语句查询的时候问题来了,一查才知道,是因为用了div做column的名字,而自己不知道这是MySQL的预定义字符。决定花点时间,好好学习一下,不能再犯类似的错误了。
ADD : 修改表结构时用于添加column
ALL: 用在查询的判断中https://dev.mysql.com/doc/refman/5.5/en/all-subqueries.html
ALTER: 修改表结构时使用
ANALYZE: 应该是用在数据库管理中analyze table -- analyzes and stores the key distribution for a table。http://dev.mysql.com/doc/refman/5.6/en/analyze-table.html
AND: 判断时常用
AS: 选择时常用
ASC: 排序使用,顺序排列。不过mysql默认的排序就是ASC,可以不写。
ASENSITIVE: Google翻译,这个词的意思是敏感性未定型。从MySQL的官方文档看,这是Mysql 5的预定义字符,但是这个字符做什么用,我没有找到相关文档╮(╯_╰)╭。
BEFORE: 用于出发预定义的程序,与trigger一起用,是在某操作事件发生前,触发
BETWEEN:用在条件判断中,用来替换 <= and >=,可以这样写 where t1 between '2012-01-01' and '2012-06-01'
BIGINT: 8 byte integer
BINARY: is an operator casts the string following it to a binary string
BLOB: a binary large object that can hold a variable amount of data. 与TEXT相对应的。用比特流来存储数据
BOTH: mysql> SELECT TRIM(BOTH 'x' FROM 'xxxbarxxx');
-> 'bar'
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
BY: order by columnX
CALL:invokes a stored procedure that was defined previously with CREATE PROCEDURE
. http://dev.mysql.com/doc/refman/5.5/en/call.html
CASCADE:a reference option, Delete or update the row from the parent table, and automatically delete or update the matching rows in the child table. http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html
CASE:用法很像其他编程语言里的switch(){ case:....}
http://dev.mysql.com/doc/refman/5.0/en/case-statement.html
CHANGE: 有个命令叫 change master to [option,...] http://dev.mysql.com/doc/refman/5.0/en/change-master-to.html
CHAR:相对于varchar来说,存储占用空间不变长度,需要一提的是,char(4)占用4bytes,而varchar(4)在4个字符存满的情况下,占用5bytes。http://dev.mysql.com/doc/refman/5.0/en/char.html
CHARACTER:用于对CHARACTER SET操作
CHECK: 有check table 命令,检查table的状态和错误http://dev.mysql.com/doc/refman/5.0/en/check-table.html
COLLATE:覆盖原字码的字符编码,可以用在比对中如果存在特殊字符的情况下http://dev.mysql.com/doc/refman/5.0/en/charset-collate.html
COLUMN:常用,不解释
CONDITION: 没找到,在文档中提到condition的时候,指的是判断的条件语句 when [condtion],不过似乎本身并没有这个命令。
CONNECTION: KILL CONNECTION = KILL ,类似的还有KILL QUERY,用于切断链接或者正在查询中的语句http://dev.mysql.com/doc/refman/5.1/en/kill.html
CONSTRAINT:
The CONSTRAINT
clause allows you to name the constraint explicitly, either to make metadata more readable or else to use the name when you want to drop the constraint. The SQL standard requires that the CONSTRAINT
clause is optional. If you leave it out, the RDBMS creates a name automatically, and the name is up to the implementation. http://stackoverflow.com/questions/310561/mysql-terminology-constraints-vs-foreign-keys-difference
CONTINUE:有点像其它语言里循环的时候用的continue http://dev.mysql.com/doc/refman/5.0/en/declare-handler.html
CONVERT:字符编码转换 http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html
CREATE:常用,不解释
CROSS: 在MYSQL中 JOIN = CROSS JOIN = INNER JOIN http://miyulano.iteye.com/admin/blogs/1164659
CURRENT_DATE: 等同于 CURDATE()
CURRENT_TIME:等同于
CURTIME()
CURRENT_TIMESTAMP:等同于 NOW()
CURRENT_USER: return currentuser@hostname
CURSOR:
http://dev.mysql.com/doc/refman/5.0/en/cursors.html
DATABASE: 字面意思,不解释
DATABASES: 最常用的大概是show databases
DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html
DEC: 十进制 DEC = DECIMAL = FIXED
DECIMAL: 十进制 DEC = DECIMAL = FIXED
DECLARE:
The DECLARE
statement is used to define various items local to a program http://dev.mysql.com/doc/refman/5.0/en/declare.html
DEFAULT: 常用,不解释
DELAYED: INSERT DELAYED, 感觉是先写在缓存中,积累到一定量一次写入disk中?http://dev.mysql.com/doc/refman/5.5/en/insert-delayed.html
DELETE: 常用,不解释
DESC: 倒序排序
DESCRIBE: DESCRIBE {tablename} = DESC {tablename}
DETERMINISTIC:
http://dev.mysql.com/doc/refman/5.1/en/stored-programs-logging.html
DISTINCT: 用在select中,有order by的作用http://dev.mysql.com/doc/refman/5.0/en/distinct-optimization.html
DISTINCTROW: The ALL
and DISTINCT
options specify whether duplicate rows should be returned. ALL
(the default) specifies that all matching rows should be returned, including duplicates. DISTINCT
specifies removal of duplicate rows from the result set. It is an error to specify both options. DISTINCTROW
is a synonym for DISTINCT
. http://dev.mysql.com/doc/refman/5.5/en/select.html
DIV: Integer division (整数除法)http://dev.mysql.com/doc/refman/5.0/en/arithmetic-functions.html
DOUBLE: 常用,不解释
DROP: 常用,不解释
DUAL: You are permitted to specify DUAL
as a dummy table name in situations where no tables are referenced
EACH:没找到╮(╯_╰)╭
ELSE,ELSEIF:同其他语言
ENCLOSED:FIELDS的选项for LOAD DATA, controls how to read or write special characters
ESCAPED:同上http://dev.mysql.com/doc/refman/5.1/en/load-data.html
EXISTS:If a subquery returns any rows at all, EXISTS
is subquery
TRUE
, and NOT EXISTS
is subquery
FALSE
. http://dev.mysql.com/doc/refman/5.0/en/exists-and-not-exists-subqueries.html
EXIT:Command,Exit mysql. Same as quit.
EXPLAIN:The EXPLAIN
statement can be used either as a way to obtain information about how MySQL executes a statement, or as a synonym for DESCRIBE
: http://dev.mysql.com/doc/refman/5.0/en/explain.html
FALSE:常用,不解释
FETCH: 类似mysql_fetch_array这样的,http://dev.mysql.com/doc/refman/5.0/en/fetch.html,http://dev.mysql.com/doc/refman/5.0/en/cursors.html
FLOAT:数据类型,长度4字节 详细:http://www.5iphp.com/node/140
FLOAT4, FLOAT8: MySQL allows FLOAT4 and FLOAT8 as synonyms, but what they are synonyms for depends on your version of MySQL:
-
Prior to MySQL 3.23.6, FLOAT4 and FLOAT8 are equivalent to FLOAT(10,2) and DOUBLE(16,4).
-
For MySQL 3.23.6 and later, FLOAT4 and FLOAT8 are equivalent to FLOAT and DOUBLE.
FOR: (没找到相关)
FORCE:{USE|FORCE} INDEX
is applied if present. (If not, the optimizer-determined set of indexes is used.) http://dev.mysql.com/doc/refman/5.1/en/index-hints.html
FOREIGN: foreign key
FROM: 常用,不解释
FULLTEXT:an index type, the more words in the text, the large size of the index, more: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html
GOTO: 编程语言里常见
GRANT: grant user privileges
GROUP: 常用
HAVING:用来约束group by http://dev.mysql.com/doc/refman/5.0/en/group-by-hidden-columns.html
HIGH_PRIORITY:HIGH_PRIORITY
gives the SELECT
higher priority than a statement that updates a table. You should use this only for queries that are very fast and must be done at once. HIGH_PRIORITY
cannot be used with SELECT
statements that are part of a UNION
.http://dev.mysql.com/doc/refman/5.5/en/select.html
HOUR_MICROSECOND: format 'HOURS:MINUTES:SECONDS.MICROSECONDS'
HOUR_MINUTE: format 'HOURS:MINUTES'
HOUR_SECOND: format 'HOURS:MINUTES:SECONDS'
IF: 判断
IGNORE: IGNORE INDEX
IN: Where a in ( x, x, x)
INDEX: 索引http://database.51cto.com/art/201010/229475.htm
INFILE: load data infile http://dev.mysql.com/doc/refman/5.1/en/load-data.html
INNER: inner join
INOUT: 执行前需要被初始化的全局变量http://dev.mysql.com/doc/refman/5.0/en/call.html
INSENSITIVE:与string的匹配相关
INSERT: 常用,不解释
INT:4字节
INT1 : = TINYINT 1字节 (-128 ~ 127 | 0 - 255)
INT2 = Small 2字节(-32768 ~ 32767 | 0 ~ 65535)
INT3 = MEDIUMINT 3字节 (1600万+)
INT4 = INT 4字节 (40亿+)
INT8 = BIGINT 8字节
INTEGER = INT
INTERVAL: 用在时间相关的函数里。The INTERVAL
keyword and the unit
specifier are not case sensitive. http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html
INTO: insert into table
IS: is null, is not null. http://dev.mysql.com/doc/refman/5.0/en/working-with-null.html
ITERATE: means “start the loop again.” http://dev.mysql.com/doc/refman/5.0/en/iterate-statement.html
JOIN: 常用,不解释
KEY:
KEY is normally a synonym for INDEX. The key attribute PRIMARY KEY can also be specified as just KEY when given in a column definition.
http://stackoverflow.com/questions/924265/what-does-the-key-keyword-mean
KEYS: (╮(╯_╰)╭)
KILL: Each connection to mysqld runs in a separate thread. You can see which threads are running with the SHOW PROCESSLIST
statement and kill a thread with the KILL
statement. http://dev.mysql.com/doc/refman/5.0/en/kill.html thread_id
LABEL: 用来标记loop
http://dev.mysql.com/doc/refman/5.1/en/statement-labels.html
LEADING:mysql> SELECT TRIM(LEADING 'x' FROM 'xxxbarxxx');
-> 'barxxx'
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
LEAVE: LEAVE label
This statement is used to exit the flow control construct that has the given label. If the label is for the outermost stored program block, LEAVE
exits the program.
http://dev.mysql.com/doc/refman/5.0/en/leave-statement.html
LEFT: 常用 left join
LIKE:常用 like '%%s%'
LIMIT: 常用
LINEAR:
linear hashing
http://dev.mysql.com/doc/refman/5.1/en/partitioning-linear-hash.html
LINES: load data infile 中,用于定义line的起始 http://dev.mysql.com/doc/refman/5.1/en/load-data.html
LOAD:load data infile http://dev.mysql.com/doc/refman/5.1/en/load-data.html
LOCALTIME:等同于
NOW()
LOCALTIMESTAMP:等同于NOW()
LOCK: lock table http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html
LONG:在mysql中相当于
MEDIUMTEXT 长度是
L
+ 3 bytes, where L
< 224
LONGBLOB:二进制方式存储的LONG,用于存放可变的数据,长度
L
+ 4 bytes, where L
< 232
LONGTEXT: L
+ 4 bytes, where L
< 232
LOOP: 循环
LOW_PRIORITY:To give a specific INSERT
, UPDATE
, or DELETE
statement lower priority, use the LOW_PRIORITY
attribute.http://dev.mysql.com/doc/refman/5.0/en/table-locking.html
MATCH:
MATCH (
感觉像精确搜索,查找COL1,COL2中是否有匹配的的字段,但是,当匹配字段的出现率在表中高于50%时,返回结果为0 http://dev.mysql.com/doc/refman/5.0/en/fulltext-natural-language.html col1
,col2
,...) AGAINST (expr
[search_modifier
])
MEDIUMBLOB:
A BLOB
is a binary large object that can hold a variable amount of data. The four BLOB
types are TINYBLOB
, BLOB
,MEDIUMBLOB
. 长度等同于MEDIUMTEXT,都是L
+ 3 bytes, where L
< 224http://dev.mysql.com/doc/refman/5.0/en/blob.html
MEDIUMINT:3byte长的int,(+-)800 0000+
MEDIUMTEXT:L
+ 3 bytes, where L
< 224
MIDDLEINT: 在网络上找到的说法是mysql 没有
MIDDLEINT 这个数据类型,但是它的确在预定义词组里╮(╯_╰)╭
MINUTE_MICROSECOND: fomate 'MINUTES:SECONDS.MICROSECONDS'http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html
MINUTE_SECOND: fomate 'MINUTES:SECONDS' http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html
MOD: 求余数,等同于%(Modulo operation. Returns the remainder of N
divided by M
)
MODIFIES: MODIFIES SQL DATA
indicates that the routine contains statements that may write data (for example, INSERT
orDELETE
) http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html
NATURAL : The NATURAL [LEFT] JOIN
of two tables is defined to be semantically equivalent to an INNER JOIN
or a LEFT JOIN
with a USING
clause that names all columns that exist in both tables.
NOT:常用
NO_WRITE_TO_BINLOG: By default, the server writes FLUSH
statements to the binary log so that they replicate to replication slaves. To suppress logging, use the optional NO_WRITE_TO_BINLOG
keyword or its alias LOCAL
.
NULL:常用
NUMERIC: ╮(╯_╰)╭numeric functions
http://dev.mysql.com/doc/refman/5.0/en/numeric-functions.html
ON:和join一起用
OPTIMIZE:For InnoDB
tables, OPTIMIZE TABLE
is mapped to ALTER TABLE
, which rebuilds the table to update index statistics and free unused space in the clustered index.http://dev.mysql.com/doc/refman/5.1/en/optimize-table.html
OPTION: ╮(╯_╰)╭
OPTIONALLY: If you specify OPTIONALLY
, the ENCLOSED BY
character is used only to enclose values from columns that have a string data type (such as CHAR
, BINARY
, TEXT
, or ENUM
): http://dev.mysql.com/doc/refman/5.0/en/load-data.html
OR:常用 where中
ORDER:常用
OUT: 三种类型的变量,in是局部变量,传值不传参,out为全局变量,但初始化时值必须为NULL,inout也是全局,但是通过传值来设置初始值。
OUTER: 外链接 outer join
OUTFILE: SELECT ... INTO OUTFILE
writes the selected rows to a file.
PRECISION: 精密匹配?
PRIMARY:primary key
PROCEDURE:CREATE PROCEDURE, it can be called later
http://dev.mysql.com/doc/refman/5.0/en/create-procedure.html
PURGE:清除logThe PURGE BINARY LOGS
statement deletes all the binary log files listed in the log index file prior to the specified log file name or date. http://dev.mysql.com/doc/refman/5.0/en/purge-binary-logs.html
RAID0: RAID是一种存储技术http://en.wikipedia.org/wiki/RAID, 按照我的理解,RAID 0应该是相对于操作系统层的和存储相关的命名。它不是一个专有名词,而是约定熟成的RAID的某个scheme。
RANGE:
READ:
READS :
REAL:相当于DOUBLE PRECISION
REFERENCES:定义foreign key时使用
REGEXP:用于正则表达式匹配字符串
http://dev.mysql.com/doc/refman/5.1/en/regexp.html#operator_regexp
RELEASE:
RENAME :修改表名、数据库名的时候用
REPEAT: 重复。。直到。。REPEAT...UNITL...END REPEAT
http://dev.mysql.com/doc/refman/5.0/en/repeat-statement.html
REPLACE:1, REPLACE
works exactly like INSERT
, except that if an old row in the table has the same value as a new row for aPRIMARY KEY
or a UNIQUE
index, the old row is deleted before the new row is inserted. 2, REPLACE(text_string, from_string, to_string)。
REQUIRE : 用在GRANT中,用于限定用户,比如REQUIRE SSL
http://dev.mysql.com/doc/refman/5.0/en/grant.html
RESTRICT: a reference option, Rejects the delete or update operation for the parent table. http://dev.mysql.com/doc/refman/5.5/en/innodb-foreign-key-constraints.html
RETURN: 就是你想到的那个常用意思。
REVOKE: REVOKE语句允许系统管理员从MySQL账户撤销的特权。E.G. REVOKE INSERT ON *.* FROM 'jeffrey'@'localhost'; http://dev.mysql.com/doc/refman/4.1/en/revoke.html
RIGHT:1,right join; 2 ,从右边开始截取字符串
RLIKE:Synonym for REGEXP 用正则表达式匹配
SCHEMA: CREATE SCHEMA is a synonym for CREATE DATABASE as of MySQL 5.0.2.
SCHEMAS: SHOW SCHEMAS等同于SHOW DATABASES
SECOND_MICROSECOND:
SELECT DATE_ADD('1992-12-31 23:59:59.000002',
INTERVAL '1.999999' SECOND_MICROSECOND);
SELECT:常用
SENSITIVE:
SEPARATOR:在GROUP_CONCAT中使用,这个function的作用是将查询到的记录合并成一个string, separator来定义分隔字符。http://mahmudahsan.wordpress.com/2008/08/27/mysql-the-group_concat-function/
SET: 常用
SHOW: 常用http://dev.mysql.com/doc/refman/5.5/en/show.html
SMALLINT:The signed range is –32768 to 32767.
SPATIAL: 用于定义index http://dev.mysql.com/doc/refman/5.0/en/create-index.html
SPECIFIC:
SQL:
SQLEXCEPTION:SQLEXCEPTION
is shorthand for the class of SQLSTATE values that do not begin with '00'
, '01'
, or '02'
. http://dev.mysql.com/doc/refman/5.1/en/declare-handler.html
SQLSTATE: 看上一条。
SQLWARNING:SQLWARNING
is shorthand for the class of SQLSTATE values that begin with '01'
SQL_BIG_RESULT: SQL_BIG_RESULT
or SQL_SMALL_RESULT
can be used with GROUP BY
or DISTINCT
to tell the optimizer that the result set has many rows or is small, respectively. For SQL_BIG_RESULT
, MySQL directly uses disk-based temporary tables if needed, and prefers sorting to using a temporary table with a key on the GROUP BY
elements. For SQL_SMALL_RESULT
, MySQL uses fast temporary tables to store the resulting table instead of using sorting. This should not normally be needed. http://dev.mysql.com/doc/refman/5.1/en/select.html
SQL_CALC_FOUND_ROWS: SQL_CALC_FOUND_ROWS
tells MySQL to calculate how many rows there would be in the result set, disregarding any LIMIT
clause. SQL_CALC_FOUND_ROWS
and FOUND_ROWS()
can be useful in situations when you want to restrict the number of rows that a query returns, but also determine the number of rows in the full result set without running the query again. http://dev.mysql.com/doc/refman/5.5/en/information-functions.html
SQL_SMALL_RESULT:http://dev.mysql.com/doc/refman/5.1/en/select.html
SSL:就是你知道的那个SSL
STARTING:
STRAIGHT_JOIN:STRAIGHT_JOIN
is similar to JOIN
, except that the left table is always read before the right table.
TABLE:常用
TERMINATED:
例子:
SELECT * INTO OUTFILE 'data.txt'
FIELDS TERMINATED BY ','
FROM table2;
THEN:WHEN...THEN
TINYBLOB:L
+ 1 bytes, where L
< 28
TINYINT: -128 ~ 127
TINYTEXT:L
+ 1 bytes, where L
< 28
TO:
TRAILING: TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM ] str), Indicates that only trailing prefixes are to be removed.
TRIGGER:A trigger is a named database object that is associated with a table, and that activates when a particular event occurs for the table.
TRUE:你懂的
UNDO:这个.....
UNION:UNION
is used to combine the result from multiple SELECT
statements into a single result set.
UNIQUE : 你懂的
UNLOCK: UNLOCK TABLE http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html
UNSIGNED:用于非负数定义
UPDATE:你懂的
USAGE: Synonym for “no privileges”。 USAGE
can be specified to create a user that has no privileges, or to specify the REQUIRE
or WITH
clauses for an account without changing its existing privileges.
USE: use database_name
USING:The USING(
clause names a list of columns that must exist in both tables. If tables column_list
)a
and b
both contain columns c1
, c2
, and c3
, the following join compares corresponding columns from the two tables:
a LEFT JOIN b USING (c1,c2,c3)
http://dev.mysql.com/doc/refman/5.0/en/join.html
UTC_DATE: UTC - 世界标准时间 return 'YYYY-MM-DD'
UTC_TIME: returns the current UTC time as a value in 'HH:MM:SS' or HHMMSS format depending on the context of the function
UTC_TIMESTAMP: return 'YYYY-MM-DD HH:MM:SS'
VALUES: 你懂的
VARBINARY:The BINARY
and VARBINARY
types are similar to CHAR
and VARCHAR
, except that they contain binary strings rather than nonbinary strings.
VARCHAR:你懂的
VARCHARACTER: 貌似没有
VARYING:VARCHAR是CHARACTER VARYING一个缩写
WHEN:你懂的
WHERE :你懂的
WHILE:循环,你懂的
WITH: 据说 WITH AS 用于缩短select时间,但是没在MYSQL上找到相关文档
WRITE:
X509: GRANT数据库操作权限给用户的时候,REQUIRE的选项,和SSL相似
XOR: Logical XOR. Returns NULL
if either operand is NULL
. For non-NULL
operands, evaluates to 1
if an odd number of operands is nonzero, otherwise 0
is returned.
http://dev.mysql.com/doc/refman/5.0/en/logical-operators.html
YEAR_MONTH:
SELECT EXTRACT(YEAR_MONTH FROM '2009-07-02 01:02:03');
-> 200907
ZEROFILL: 等同于 UNSIGNED。If you specify ZEROFILL
for a numeric column, MySQL automatically adds the UNSIGNED
attribute to the column.
发表评论
-
PHP查询MySQl数据库的效率小记
2012-11-18 13:24 9151. MySQL数据库的连接和 ... -
关于float的精准问题原因
2012-07-16 21:34 835最近在整理关于MYSQL预定义词的笔记,然后发现了一个经常被提 ... -
MySQL中JOIN到用法
2011-09-02 21:15 914- LEFT JOIN FROM a LEFT JOI ... -
Postgresql 数据库使用笔记
2011-08-05 11:51 600安装: $ sudo apt-get install p ... -
不同数据库SQL语句的差别
2011-06-20 21:44 10961,系统时间 Oracle:SYSDATE SQLSe ...
相关推荐
函数则是在SQL中执行特定任务的预定义代码块,可以接收参数并返回值,它们都是数据库对象,可以被其他SQL语句调用。 总结来说,通过MySQL的存储过程和内置函数,我们可以高效地处理字符串分割问题,将一个包含多个...
它限制了字段只能接受预定义的一组值中的某一个。 - **语法**: `ENUM('value1', 'value2', ...)` - 每个枚举值必须用单引号括起来。 - 枚举值的顺序很重要,因为MySQL为每个值分配了一个索引,从1开始计数。 - **...
- ENUM是预定义值列表,常用于限制某一列的输入值。 10. REGEXP: - REGEXP用于模式匹配,可以查找字符串中任何位置的匹配模式。 11. CHAR与VARCHAR的区别: - CHAR长度固定,用空格填充到指定长度,检索时会...
函数则是返回单个值的预定义过程。手册会详细介绍如何创建、调用和删除这些程序元素。 七、事务处理 事务是数据库操作的基本单位,保证了数据的一致性和完整性。手册会讲解START TRANSACTION、COMMIT、ROLLBACK等...
API(Application Programming Interface)是一组预定义的函数、结构体、常量和类型定义,用于开发应用程序。MySQL C API 提供了连接、查询、事务处理等一系列功能,使得程序员能够方便地在 C 语言程序中操作 MySQL ...
9. ENUM用法:ENUM是一个字符串对象,用于指定一组预定义值。在创建表时,可以通过ENUM来定义列的值。 10. REGEXP的定义:REGEXP是MySQL中的模式匹配功能,可以用来匹配包含在字符串中的模式。 11. CHAR与VARCHAR...
API是一组预定义的函数、数据类型、常量和宏,它们为开发者提供了一种标准的方式来访问MySQL数据库。C语言的API使得开发人员可以直接使用C语言的语法和结构来实现数据库操作,而无需依赖特定的数据库抽象层。 在...
数据库函数是数据库管理系统中的一组预定义函数,用于对数据进行处理、计算和分析。DB2 和 MySQL 是常用的关系数据库管理系统,它们提供了丰富的函数集合,帮助用户更方便地处理和分析数据。本文将对 DB2 和 MySQL ...
6. **触发器**:触发器是在特定数据库操作(如INSERT, UPDATE, DELETE)之前或之后自动执行的预定义SQL语句,常用于实现业务规则或审计。 7. **存储过程和函数**:存储过程是预编译的SQL语句集合,可以包含条件判断...
它包含了一系列预定义的SQL脚本,可以用来评估MySQL 5.6.24与其他数据库在特定任务上的表现。 10. lib目录:这个目录存放了MySQL的库文件,主要用于开发人员在应用程序中链接MySQL。 总的来说,"mysql-5.6.24-win...
- SET:预定义字符串列表中的多个值,最多可达64个元素。 【Oracle 数据类型】 Oracle 数据类型包括标量、复合、引用和LOB四类。 1. 标量(SCALAR): - 数字:NUMBER、PLS_INTEGER 和 BINARY_INTEGER。 - ...
函数则是在查询中可以直接调用的预定义操作,如内置数学函数、字符串函数和日期时间函数。 8. **触发器**: 触发器是响应特定数据库事件(如INSERT、UPDATE或DELETE)自动执行的程序,常用于实现业务规则和数据验证...
- **功能**:此函数会在预定义的字符(单引号、双引号、反斜杠和NULL)前添加反斜杠。 - **语法**:`addslashes(string)` - **示例**:`echo addslashes("It's a test");` - **输出结果**:`It\'s a test` 5. *...
函数则是执行特定任务的预定义操作。 7. **触发器**:在特定事件(如INSERT、UPDATE、DELETE)发生时自动执行的代码。 8. **分区表**:将大表分成多个物理部分,提高查询性能。 9. **复制与集群**:MySQL支持主从...
通过 PHP 预定义类 mysqli,实现与 MySQL 数据库的连接。代码如下: ```php $conn = new mysqli("localhost", "root", "root", "db_database09"); $conn->query("set names gb2312"); ``` 调用存储过程 pro_reg,...
在MySQL中,函数是预定义的代码块,可以接受一个或多个参数,并返回一个值。这些函数广泛用于查询和处理数据,包括数值计算、字符串操作、日期和时间处理、条件判断以及聚合运算等。以下是一些关键的MySQL函数类别...
3. **视图**:视图是预定义的SQL查询结果集,可以被用作虚拟表,简化了复杂查询并提供了数据抽象。 4. **分区功能**:MySQL 5.0支持表分区,允许将大表分割成更小、更易管理的部分,以优化查询性能。 5. **改进的...
函数则是可以接受参数并返回值的预定义操作。 3. 触发器:触发器是在特定数据库操作(如INSERT, UPDATE, DELETE)前或后自动执行的代码,常用于实现业务规则和数据完整性检查。 4. 外键与参照完整性:外键用于建立表...