SQL Commands - FROM "table_name" WHERE...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
SQL SELECT SQL DISTINCT SQL WHERE SQL AND OR SQL IN SQL BETWEEN SQL LIKE SQL ORDER BY SQL Functions SQL COUNT SQL GROUP BY SQL HAVING SQL ALIAS SQL JOIN SQL OUTER JOIN SQL CONCATENATE SQL SUBSTRING SQL TRIM SQL CREATE TABLE SQL CONSTRAINT SQL PRIMARY KEY SQL FOREIGN KEY SQL CREATE VIEW SQL CREATE INDEX SQL ALTER TABLE SQL DROP TABLE SQL TRUNCATE TABLE SQL INSERT INTO SQL UPDATE SQL DELETE FROM SQL UNION SQL UNION ALL SQL INTERSECT SQL MINUS SQL Subquery SQL EXISTS SQL CASE SQL Rank SQL Median SQL Running Totals SQL Percent to Total SQL Cumulative Percent to Total SQL Syntax
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Select Statement SELECT "column_name" FROM "table_name" Distinct SELECT DISTINCT "column_name" FROM "table_name" Where SELECT "column_name" FROM "table_name" WHERE "condition" And/Or SELECT "column_name" FROM "table_name" WHERE "simple condition" {[AND|OR] "simple condition"}+ In SELECT "column_name" FROM "table_name" WHERE "column_name" IN ('value1', 'value2', . ..) Between SELECT "column_name" FROM "table_name" WHERE "column_name" BETWEEN 'value1' AND 'value2' Like SELECT "column_name"
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: FROM "table_name" WHERE "column_name" LIKE {PATTERN} Order By SELECT "column_name" FROM "table_name" [WHERE "condition"] ORDER BY "column_name" [ASC, DESC] Count SELECT COUNT("column_name") FROM "table_name" Group By SELECT "column_name1", SUM("column_name2") FROM "table_name" GROUP BY "column_name1" Having SELECT "column_name1", SUM("column_name2") FROM "table_name" GROUP BY "column_name1" HAVING (arithematic function condition) Create Table Statement CREATE TABLE "table_name" ("column 1" "data_type_for_column_1", "column 2" "data_type_for_column_2", ... ) Drop Table Statement DROP TABLE "table_name" Truncate Table Statement TRUNCATE TABLE "table_name" Insert Into Statement INSERT INTO "table_name" ("column1", "column2", . ..) VALUES ("value1", "value2", . ..) Update Statement UPDATE "table_name" SET "column_1" = [new value] WHERE {condition} Delete From Statement DELETE FROM "table_name" WHERE {condition}...
View Full Document

This note was uploaded on 10/25/2010 for the course CMPN SEM4 taught by Professor Thakur during the Spring '07 term at University of Mumbai.

Page1 / 3

SQL Commands - FROM "table_name" WHERE...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online