$conn = mysql_connect();
process language;
no-process language;
/*
SQL
DDL define
DML mainpulate
DCL control
interacitve SQL
embeded SQL
SELECT user_name,age
FROM tbl_user
WHERE age>18
key words:
CREATE TABLE
DROP TABLE
ALTER TABLE
CREATE INDEX
DROP INDEX
CREATE PROCEDURE
DROP PROCEDURE
SELECT
INSERT
UPDATE
DELETE
GRANT
REVOKE
COMMIT
ROLLBACK
-----
2. Data type:
INT type:
TINYINT 1byte
SAMILLINT 2 bytes
MEDIUMINT 3 bytes
INT 4 bytes
BIGINT 8bytes
Real number type:
FLOAT 4 bytes
DOUBLE 8 bytes
DECIMAL(20,2)
String type: >80%
VARCHAR can change
CHAR length-unchanged
TEXT >> TINYTEXT TEXT MEDIUMTEXT LONGTEXT //charset
BLOB >> TINYBLOB BLOB MEDIUMBLOB LONGBLOB //binary
DATETIME 8 bytes
TIMESTAMP 1970-1-1 Gerorg time - 2938
Select data type standard:
1. minimize
2. simple
3. index not NULL
--------
3. Common operation
add delete edit search
apt-get: advancded-package-tools
update
install
remove
autoremove
purge
upgrade
source
check