SQL

Card Set Information

Author:
bidemi12
ID:
312186
Filename:
SQL
Updated:
2015-12-01 01:31:58
Tags:
SQL
Folders:
SQL
Description:
SQL
Show Answers:

Home > Flashcards > Print Preview

The flashcards below were created by user bidemi12 on FreezingBlue Flashcards. What would you like to do?


  1. SYNTAX FOR DELETE
    • DELETE FROM table_name
    • WHERE some_column=some_value;
  2. SYNTAX FOR SELECT
    • SELECT column_name,column_name
    • FROM table_name;
  3. SYNTAX FOR UPDATE
    • UPDATE table_name
    • SETcolumn1=value1,column2=value2,...
    • WHERE some_column=some_value;
  4. SYNTAX FOR DISTINCT
    • SELECT DISTINCTcolumn_name,column_name
    • FROM table_name;
  5. SYNTAX FOR WHERE
    • SELECT column_name,column_name
    • FROM table_name
    • WHERE column_name operator value;
  6. SYNTAX FOR ORDER BY
    • SELECT column_name, column_name
    • FROM table_name
    • ORDER BY column_name ASC|DESC, column_name ASC|DESC;
  7. SYNTAX FOR LIKE
    • SELECT column_name(s)
    • FROM table_name
    • WHERE column_name LIKE pattern;
  8. SYNTAX FOR INSERT INTO
    • INSERT INTO table_name (column1,column2,column3,...)
    • VALUES (value1,value2,value3,...);
  9. WHAT IS THE SYNTAX FOR DROP INDEX
    DROP INDEX table_name.index_name
  10. WHAT IS THE SYNTAX FOR JOIN
    • SELECT Orders.OrderID,
    • Customers.CustomerName, Orders.OrderDate
    • FROM Orders
    • INNER JOIN Customers
    • ON Orders.CustomerID=Customers.CustomerID;
  11. WHAT IS THE SYNTAX FOR RIGHT JOIN
    • SELECT column_name(s)
    • FROM table,
    • RIGHT JOIN table2
    • ON table1.column_name=table2.column_name;
  12. WHAT IS THE SYNTAX FOR INSERT INTO SELECT
    • INSERT INTO table2(column_name(s))
    • SELECT column_name(s)
    • FROM table1;
  13. CHARACTER(n)
    Character string. Fixed-length n
  14. VARCHAR(n) orCHARACTER VARYING(n)
    Character string. Variable length. Maximum length n
  15. BINARY(n)
    Binary string. Fixed-length n
  16. BOOLEAN
    Stores TRUE or FALSE values
  17. VARBINARY(n) orBINARY VARYING(n)
    Binary string. Variable length. Maximum length n
  18. INTEGER(p)
    Integer numerical (no decimal). Precision p
  19. SMALLINT
    Integer numerical (no decimal). Precision 5
  20. INTEGER
    Integer numerical (no decimal). Precision 10
  21. BIGINT
    Integer numerical (no decimal). Precision 19
  22. DECIMAL(p,s)
    Exact numerical, precision p, scale s. Example: decimal(5,2) is a number that has 3 digits before the decimal and 2 digits after the decimal
  23. NUMERIC(p,s)
    Exact numerical, precision p, scale s. (Same as DECIMAL)
  24. FLOAT(p)
    Approximate numerical, mantissa precision p. A floating number in base 10 exponential notation. The size argument for this type consists of a single number specifying the minimum precision
  25. REAL
    Approximate numerical, mantissa precision 7
  26. FLOAT
    Approximate numerical, mantissa precision 16
  27. DOUBLE PRECISION
    Approximate numerical, mantissa precision 16
  28. DATE
    Stores year, month, and day values
  29. TIME
    DATE
  30. TIMESTAMP
    Stores year, month, day, hour, minute, and second values
  31. INTERVAL
    Composed of a number of integer fields, representing a period of time, depending on the type of interval
  32. A set-length and ordered collection of elements
    A set-length and ordered collection of elements
  33. MULTISET
    A variable-length and unordered collection of elements
  34. XML
    Stores XML data

What would you like to do?

Home > Flashcards > Print Preview