BLHTML.org

BLHTML.org / Web Programming /

 
  MySQL 1603 5
  View details 909 0
SHOW DATABASES;
DESCRIBE table;
SHOW COLUMNS FROM table;

order by table ASC

order by table DESC
Showing databases
Displays the tables from the current database
Displaying Fields from the table

Sorts table Ascending, abc
ascending order (default)
Sorts table Descending, cba

SELECT * FROM table order by datum desc;
SELECT field3, field5, FROM table WHERE field1 = "text";
  Number types 887 0
TINYINT (1 byte)
SMALLINT (2 byte)
MEDIUMINT (3 byte)
INT (4 byte)
BIGINT (8 byte)

FLOAT (4 byte)
DOUBLE (8 byte)
DECIMAL

UNSIGNED
AUTO_INCREMENT
PRIMARY KEY
NULL || NOT NOLL
EMUM('M', 'F') DEFAULT 'F'
-128 -- 127 (0 -- 255)
-32768 -- 32767 (0 -- 65535)
-8388K -- 8388K (0 -- 16777K)
-2.147G -- 2.147G (0 -- 4.294G)
-9223372036G -- 9223372036G (0 -- 18446744073G)

Small floats
Large float


(Only positive numbers)
Automatic unique counter
Unique Key Table
May be empty or not
Create your own list object
  Administration 881 0
/var/lib/mysql/database

mysqldump
mysqlimport

mysqldump -uusername -ppassword database > filename.sql
mysqldump -uusername -ppassword database table1 table2 table8 > filename.sql

mysql -hlocalhost -uroot -pnytt_password database


CREATE DATABASE database;
DROP database;
USE database;

FLUSH PRIVILEGES;
(same as reboot MySQL)

OPTIMIZE TABLE table1


QUIT
Database physical site

Security backup
Restoring the database

Entire Database

Some tables


Start your database


Creates New Database
Deletes database
Activates database

View the right of the tables
and enable changes.
Sets the table in order

Quit MySQL
  String and types 920 0
char(X)
varchar(X)
TINYTEXT
TINYBLOB
TEXT
BLOB
MEDIUMTEXT
MEDIUMBLOB
LONGTEXT
LONGBLOB
(255 byte)
(255 byte)
(255 byte)
(255 byte)
(65535 byte)
(65535 byte)
(1.6Mbyte)
(1.6Mbyte)
(4.2Gbyte)
(4.2Gbyte)
This field is set X chars
This field is the size of the text (saves space)
clean text
Binary Large Object of picture or sound
  Create or modify 887 0
CREATE TABLE table (column name data type);
DROP TABLE table;

ALTER TABLE table CHANGE namn name CHAR(16);
ALTER TABLE table add column INT;


INSERT INTO table (Field1, Field2, Field3)
VALUES (NULL, 1000, "Text");

UPDATE table SET Field1, = 1, Field2 = 323 WHERE x=y
UPDATE customers SET name = "Martin" WHERE ID = 8;

DELETE FROM customers WHERE city = "Visby";


NOT NULL
DEFAULT 8
DROP INDEX indexname ON table
Creates table table
Erase table table

Changes the table name and type (size)
Adds a column in table table

New record


Changes the existing post


Deletes post where city = Visby


Field must not be empty
If no value then value is set to 8
Deletes Index (key)
BLHTML forum  


apache MySQL PHP No to software patents! BLHTML
© 2003, 2010 BLHTML
This page is created with BLHTML in 0.0948 seconds