Access and Adapt a Database with MySQL Queries

PHP communicates with MySQL databases by sending SQL queries. Here’s a list of SQL queries, with their syntax, that you can use to access, view, and alter the database:


ALTER TABLE table change
CREATE DATABASE database
CREATE TABLE (col def,…,PRIMARY KEY(col))
DELETE FROM tablename WHERE clause
DROP database|table
INSERT INTO table (col,col,…) VALUES (col,col,…)
LOAD DATA INFILE ″filename″ INTO TABLE table
SELECT col,col,… FROM table WHERE clause
SELECT statement UNION SELECT statement
SHOW DATABASES|TABLES
SHOW COLUMNS FROM table
UPDATE table SET col=value,… WHERE clause








dummies

Source:http://www.dummies.com/how-to/content/access-and-adapt-a-database-with-mysql-queries.html

No comments:

Post a Comment