MySQL

Card Set Information

Author:
greinert
ID:
202965
Filename:
MySQL
Updated:
2013-02-26 16:44:25
Tags:
SQL
Folders:

Description:
SQL concepts, terminology, and commands
Show Answers:

Home > Flashcards > Print Preview

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


  1. Foreign Key
    Identifies a row in a related table.
  2. Intersection of a row and column is a ____.
    Cell
  3. Column is a _________.
    Field
  4. Row is a _______
    Record
  5. Primary Key
    Uniquely identifies each row in a table
  6. SQL
    Structured Query Language
  7. API
    Application Programming Interface
  8. DBMS
    Database Management System
  9. ACID
    An acronym standing for atomicity, consistency, isolation, and durability. These properties are all desirable in a database system, and are all closely tied to the notion of a transaction.
  10. Change to this database. You need to change to some database when you first connect to MySQL.
    USE database_name
  11. Lists all MySQL databases on the system.
    SHOW DATABASES
  12. Lists all tables from the current database or from the database given in the command.
    SHOW TABLES [FROM database_name]
  13. These commands all give a list of all columns (fields) from the given table, along with column type and other info.
    • DESCRIBE table_name
    • SHOW FIELDS FROM table_name
    • SHOW COLUMNS FROM table_name
  14. Lists all indexes from this tables.
    SHOW INDEX FROM table_name
  15. Allows the user to set his/her own password.
    SET PASSWORD=PASSWORD('new_password')
  16. Creates a table with columns as indicated in the create clauses.
    CREATE TABLE table_name (create_clause1, create_clause2, ...)
  17. Removes the table from the database. Permanently! So be careful with this command!
    DROP TABLE table_name
  18. Adds the listed columns to the table.
    ALTER TABLE table_name ADD (create_clause1, create_clause2, ...)
  19. Drops the listed columns from the table.
    ALTER TABLE table_name DROP column_name
  20. Insert a complete row of data, giving a value (or NULL) for every column in the proper order.
    INSERT [INTO] table_name VALUES (value1, value2, ...)
  21. Alters the data within a column based on the conditions in the where_clause.
    UPDATE table_name SET column_name1=value1, column_name2=value2, ... [WHERE where_clause]
  22. Loads data from the listed file into the table.
    LOAD DATA LOCAL INFILE 'path to external file' INTO TABLE table_name
  23. Creates a new user on MySQL, with no rights to do anything.
    GRANT USAGE ON *.* TO user_name@localhost [IDENTIFIED BY 'password']
  24. Grants permissions on all tables for a specific database (database_name.*) to a user. Permissions are for: ALTER, CREATE, DELETE, DROP, INDEX, INSERT, SELECT, UPDATE.
    GRANT ALL ON database_name.* TO user_name@localhost
  25. Allows the user to set his/her own password.
    SET PASSWORD=PASSWORD('new_password')
  26. Revokes all permissions for the user, but leaves the user in the MySQL database.
    REVOKE ALL ON [database_name.]* FROM user_name@localhost

What would you like to do?

Home > Flashcards > Print Preview