MySQL Basics (1)

The flashcards below were created by user dalbabes on FreezingBlue Flashcards.

  1. Make a new database
    create database whatever
  2. get the current time and date
    select now()
  3. delete a table bob
    drop table bob;
  4. add a field to an existing table
    alter table bob add fieldname fieldtype
  5. remove a field from a table
    alter table bob drop fieldname
  6. add a field after a certain field or at the start of all fields
    • alter table officeproducts add description text after product_name;
    • alter table officeproducts add description text first
  7. Alter the data type of a field
    alter table bob modify description varchar(255)
  8. rename a table
    alter table officeproducts rename as office_prod;
  9. keyword to look for fields that contain certain things. What wild card character would you use?
    • Like(%bob%);
    • select first_name,birthday from friends where first_name like ("Des%");
  10. If you want to change data in a field, what would you use?
    • update table set wher
    • update/set/where
  11. delete data
    delete from tablename where
Card Set:
MySQL Basics (1)
2012-07-26 16:03:15

sql terms
Show Answers: