SQL Commands - FROM"table_name"...

Info icon This 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
Image of page 1

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

View Full Document Right 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"
Image of page 2
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern