Home Page Icon
Home Page
Table of Contents for
NOT
Close
NOT
by Tony Butcher
Sams Teach Yourself MySQL in 21 Days, Second Edition
Copyright
About the Author
Acknowledgments
We Want to Hear from You!
Introduction
At a Glance
Introduction to MySQL
What Is MySQL?
The Commercial View of MySQL
Summary
Q&A
Installing MySQL
Installation Overview
Installing on Linux
Installing on OS X
Installing on Windows
Summary
Q&A
Workshop
Getting Started with Database Design
The Need for Business Analysis
Analyzing Business Needs
Relationship Modeling
Normalization
Summary
Q&A
Workshop
Getting Hands-On with MySQL
The Essential Programs and Files of MySQL
MySQL Users
Installing ODBC
Summary
Q&A
Workshop
MySQL Data Types
Overview of Data and Column Types
Numeric Column Types
String Column Types
Date and Time
Summary
Q&A
Workshop
Manipulating a Database
Using the mysql Client Program
Creating, Dropping, and Selecting a Database
Manipulating Tables
Summary
Q&A
Workshop
Inserting and Updating Data
Inserting Data Using INSERT
Inserting and Replacing Data Using REPLACE
Performing Updates
Importing Data
Summary
Q&A
Workshop
At a Glance
Querying Data
The Basics of SELECT Queries
More Advanced Uses of SELECT
Deleting Rows with DELETE
Summary
Q&A
Workshop
Joins and Indexes
Joining Tables
Indexes
Managing Indexes in MySQL
Summary
Q&A
Workshop
Operators and Functions in MySQL
How to Use This Lesson
Operators
Logical and Conditional Functions
String Functions
Date and Time Functions
Encryption, Encoding, and Checksum Functions
Summary
Q&A
Workshop
Using PHP
What Is PHP?
A Quick Guide to PHP
The PHP API for MySQL
Summary
Q&A
Workshop
Using the Perl DBI
What Is Perl?
The Perl Interface to MySQL
Installing DBI and DBD on Linux
DBI Methods
Connecting to MySQL with the DBI
Basics of Database Queries
Handling the Resultset
Queries That Return No Resultset
Handling Query Errors
When to Use Perl
Summary
Q&A
Workshop
Using the C API
C and MySQL
When to Use C, and When Not To
Datatypes
Compiling and Linking
Connecting to Your Database
Disconnecting from a Database
Handling Errors
A Simple Connection Script
Running Queries That Return a Resultset
A Simple Query Program
Handling Resultsets
Queries That Return No Resultset
Summary
Q&A
Workshop
Security
The MySQL User Privilege System
Managing User Privileges with GRANT and REVOKE
Keeping a MySQL Installation Secure
Making Secure Connections to MySQL
Summary
Q&A
Workshop
At a Glance
Administration
Managing a Database with mysqladmin
Setting Variables for MySQL
Other Administration Tools
The MySQL Data Directory
Backing Up
Creating Fast, Compressed Tables with myisampack
Summary
Q&A
Workshop
Repair and Maintenance
Checking and Fixing a Corrupted Database
How to Use myisamchk
Checking, Repairing, and Optimizing Using SQL Commands
Summary
Q&A
Workshop
Transactions and Table Locking
What Is Table Locking?
How MySQL Uses Table Locks
Cooperative Locks
Transaction-Safe Table Types
Summary
Q&A
Workshop
Optimizing Performance
Why Optimize Performance?
What Do We Mean by Performance Anyway?
Factors Affecting Performance
Commands for Optimization
Summary
Q&A
Workshop
Replication
What Is Replication?
Replication in MySQL
Setting Up a Master-Slave Replication System
Customizing Replication
SQL Commands for Replication
Replication Topologies
Summary
Q&A
Workshop
Embedding the MySQL Server
What Is an Embedded System?
How to Create an Embedded System
Building Embedded Server Programs
Summary
Q&A
Workshop
Extending MySQL's Function Library
Why Create a New Function?
An Overview of Installing UDFs
Hands-on: Creating a Simple Function
Writing Your Own UDFs
Summary
Q&A
Workshop
Appendices
Data Type Reference
Numeric Types
String Types
Date and Time Types
SQL Reference
ALTER [IGNORE] TABLE table_name action_list
ANALYZE TABLE table_name[,table_name...]
BACKUP TABLE table_name[,table_name...] TO '/backup/directory'
BEGIN
CHECK TABLE table_name[,table_name,...] [options]
COMMIT
CREATE DATABASE [IF NOT EXISTS] database_name
CREATE [AGGREGATE] FUNCTION function_nameRETURNS {STRING|REAL|INTEGER} SONAME shared_library_name
CREATE [UNIQUE|FULLTEXT] INDEX index_nameON table_name (column_list)
CREATE [TEMPORARY] TABLE[IF NOT EXISTS] table_name[(create_definition,...)][table_options] [select_statement]
CROSS JOIN
DELETE
DESCRIBE table_name [column_name]
DESC
DROP DATABASE [IF EXISTS] database_name
DROP FUNCTION function_name
DROP INDEX index_name ON table_name
DROP TABLE [IF EXISTS] table_name[,table_name...]
EXPLAIN SELECT select_statement
EXPLAIN table_name
FLUSH flush_option[,flush_option...]
GRANT
HANDLER
INNER JOIN
INSERT
KILL thread_id
LEFT JOIN
LEFT OUTER JOIN
LOAD DATA INFILE
LOCK TABLES
NATURAL JOIN
NATURAL LEFT JOIN
NATURAL LEFT OUTER JOIN
NATURAL RIGHT JOIN
NATURAL RIGHT OUTER JOIN
OPTIMIZE TABLE table_name[,table_name...]
RENAME TABLE table_name TO new_table_name[, table_name2 TO new_table_name2 ...]
REPAIR TABLE table_name[,table_name,...] [options]
REPLACE
RESTORE TABLE table_name[,table_name...] FROM '/backup/directory'
REVOKE privileges [(column_list)][,privileges [(column_list)]...]ON {database_name.table_name}FROM username@hostname
RIGHT JOIN
RIGHT OUTER JOIN
ROLLBACK
SELECT
SET [OPTION] option=value,...
SHOW keyword parameters
TRUNCATE TABLE table_name
UNION
UNLOCK TABLES
UPDATE
USE database_name
Function and Operator Reference
&, Bitwise AND
&&, Logical AND
|, Bitwise OR
||, Logical OR
x<<n, Bitwise Left-Shift
x>>n, Bitwise Right-Shift
~, Bitwise Inversion
!, Not
+, Addition
-, Subtraction
*, Multiplication
/, Division
%, Modulo
-, Unary Minus
=, Equals
<=>, NULL-Safe Equals
<>, Not Equal To
>, Greater Than
>=, Greater Than or Equal To
<, Less Than
<=, Less Than or Equal To
ABS(x)
ACOS(x)
ADDDATE(date,INTERVAL expression type)
AES_DECRYPT(string,key)
AES_ENCRYPT(encrypted_string,key)
AND, Logical
ASCII(string)
ASIN(x)
ATAN(x)
ATAN(x,y)
ATAN2(x,y)
AVG(expression)
BENCHMARK(count,expression)
expression BETWEEN min AND max
BIN(n)
BINARY
BIT_AND(expression)
BIT_COUNT(expression)
BIT_OR(expression)
CASE
CEILING(x)
CHAR(n1[,n2...])
CHAR_LENGTH(string)
CHARACTER_LENGTH(string)
COALESCE(value[,...])
CONCAT(string1[,string2,...])
CONCAT_WS(separator,string1[,string2,...])
CONNECTION_ID()
CONV(n,base1,base2)
COS(x)
COT(x)
COUNT(expression)
COUNT(DISTINCT expression[,expression...])
CURDATE()
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURTIME()
DATABASE()
DATE_ADD(date,INTERVAL expression type)
DATE_FORMAT(date,format)
DATE_SUB(date,INTERVAL expression type)
DAYNAME()
DAYOFMONTH(date)
DAYOFWEEK(date)
DAYOFYEAR()
DECODE(encoded_string,password)
DEGREES(x)
DES_DECRYPT(encrypted_string [, key_string])
DES_ENCRYPT(string [, (key_number | key_string)])
ELT(n,string1[,string2,string3...])
ENCODE(string,password)
ENCRYPT(string[,salt])
EXP(x)
EXPORT_SET(bits,on_str,off_str[,separator][,num_bits])
EXTRACT(type FROM date)
FIELD(string,string1[,string2,string3...])
FIND_IN_SET(string,string_set)
FLOOR(x)
FORMAT(x,d)
FROM_DAYS(num)
FROM_UNIXTIME(unix_timestamp[,format])
GET_LOCK(string,timeout)
GREATEST(x1,x2[,...])
HEX(n)
HOUR(time)
IF(test_expression,expression_true,expression_false)
IFNULL(expression1,expression2)
expression IN (value[,...])
INET_ATON(expression)
INET_NTOA(expression)
INSERT(string,position,length,substr)
INSTR(string,substr)
INTERVAL(x,n0,n1[,n2,...])
expression IS NOT NULL
expression IS NULL
ISNULL(expression)
LAST_INSERT_ID([expression])
LCASE(string)
LEAST(x1,x2[,...])
LEFT(string,length)
LENGTH(string)
string LIKE pattern [ESCAPE escape_character]
LOAD_FILE(filename)
LOCATE(substr,string[,position])
LOG()
LOG10(x)
LOWER()
LTRIM(string)
MAKE_SET(bits,string1[,string2...])
MASTER_POS_WAIT(log_name,log_pos)
MATCH (column1[,column2,...] AGAINST (string)
MAX(expression)
MD5(string)
MID(string,position,length)
MIN(expression)
MINUTE(time)
MOD(n,m)
MONTH()
MONTHNAME()
NOT IN
string NOT LIKE pattern [ESCAPE escape_character]
string NOT REGEXP pattern
string NOT RLIKE pattern
NOT
NOW()
NULLIF(expression1,expression2)
OCT(n)
OCTET_LENGTH(string)
OR
ORD()
PASSWORD(string)
PERIOD_ADD(period,months)
PERIOD_DIFF(period1,period2)
PI()
POSITION(substr IN string)
POW()
POWER(x,y)
QUARTER()
RADIANS(x)
RAND([n])
string REGEXP pattern
RELEASE_LOCK(string)
REPEAT(string,count)
REPLACE(string,from_string,to_string)
REVERSE(string)
RIGHT(string,length)
string RLIKE pattern
ROUND(x)
ROUND(x,d)
RPAD()
RTRIM()
SEC_TO_TIME(seconds)
SECOND()
SESSION_USER()
SHA(string)
SIGN(x)
SIN()
SOUNDEX(string)
SPACE(length)
SQRT(x)
STD(expression)
STDDEV()
STRCMP(string1,string2)
SUBDATE(date,INTERVAL expression type)
SUBSTRING(string,delimiter,count)
SUBSTRING_INDEX(string,delimiter,count)
SUM(expression)
SYSDATE()
SYSTEM_USER()
TAN()
TIME_FORMAT(time)
TIME_TO_SEC(time)
TO_DAYS(date)
TRIM([[LEADING|TRAILING|BOTH] [substring] FROM] string)
TRUNCATE(x,d)
UCASE(string)
UNIX_TIMESTAMP([date])
UPPER(string)
USER()
VERSION()
WEEK(date[,first])
WEEKDAY(date)
YEAR(date)
YEARWEEK(date[,first])
The PHP API
mysql_affected_rows([link_identifier])
mysql_close([link_identifier])
mysql_connect([server[,username[,password[,new_link]]]])
mysql_create_db(database_name[,link_identifier])
mysql_data_seek(result,row_number)
mysql_db_name(result,offset[,field])
mysql_db_query(database_name,query[,link_identifier][,result mode])
mysql_drop_db(database_name[,link_identifier])
mysql_errno([link_identifier])
mysql_error([link_identifier])
mysql_escape_string(raw_string)
mysql_fetch_array(result)
mysql_fetch_assoc(result)
mysql_fetch_field(result,[offset])
mysql_fetch_lengths(result)
mysql_fetch_object(result)
mysql_fetch_row(result)
mysql_field_flags(result,offset)
mysql_field_len(result,offset)
mysql_field_name(result,offset)
mysql_field_seek(result,offset)
mysql_field_table(result,offset)
mysql_field_type(result,offset)
mysql_free_result(result)
mysql_get_client_info()
mysql_get_host_info([link_identifier])
mysql_get_proto_info([link_identifier])
mysql_get_server_info([link_identifier])
mysql_insert_id([link_identifier])
mysql_list_dbs([link_identifier])
mysql_list_fields(database_name,table_name[,link_identifier])
mysql_list_tables(database_name,[,link_identifier])
mysql_num_fields(result)
mysql_num_rows(result)
mysql_pconnect([server[,username[,password]]])
mysql_query(query[,link_identifier][,result_mode])
mysql_real_escape_string(raw_string[,link_identifier])
mysql_result(result,row_offset[,field])
mysql_select_db(database_name[,link_identifier])
mysql_tablename(result,offset)
mysql_unbuffered_query(query[,link_identifier][,result_mode])
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
string NOT RLIKE pattern
Next
Next Chapter
NOW()
NOT
Description:
Synonymous with
!
, logical NOT.
See also:
!
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset