分类: 数据库开发技术
2010-08-23 15:27:01
SQL
语句
语句 |
语法 |
AND / OR |
SELECT column_name(s) |
ALTER TABLE (add column) |
ALTER TABLE table_name |
ALTER TABLE (drop column) |
ALTER TABLE table_name |
AS (alias for column) |
SELECT column_name AS column_alias |
AS (alias for table) |
SELECT column_name |
BETWEEN |
SELECT column_name(s) |
CREATE DATABASE |
CREATE DATABASE database_name |
CREATE INDEX |
CREATE INDEX index_name |
CREATE TABLE |
CREATE TABLE table_name |
CREATE UNIQUE INDEX |
CREATE UNIQUE INDEX index_name |
CREATE VIEW |
CREATE VIEW view_name AS |
DELETE FROM |
DELETE FROM table_name or DELETE FROM
table_name |
DROP
DATABASE |
DROP
DATABASE database_name |
DROP
INDEX |
DROP
INDEX table_name.index_name |
DROP
TABLE |
DROP
TABLE table_name |
GROUP
BY |
SELECT
column_name1,SUM(column_name2) |
HAVING |
SELECT
column_name1,SUM(column_name2) |
IN |
SELECT
column_name(s) |
INSERT
INTO |
INSERT
INTO table_name or INSERT INTO
table_name |
LIKE |
SELECT
column_name(s) |
ORDER
BY |
SELECT
column_name(s) |
SELECT |
SELECT
column_name(s) |
SELECT
* |
SELECT
* |
SELECT
DISTINCT |
SELECT
DISTINCT column_name(s) |
SELECT
INTO |
SELECT
* or SELECT
column_name(s) |
TRUNCATE
TABLE |
TRUNCATE
TABLE table_name |
UPDATE |
UPDATE
table_name |
WHERE |
SELECT
column_name(s) |