MySQL Flashcards
DISTINC
display a unique list of values. Let’s say we have a table named employees with the following columns: employee_id, first_name, last_name, and department. but you want only the departments.
union vs join
basically union will combine new rows and join will combine data into columns
What is MySQL ?
is a relational database.
Difference between MySQL and SQL
MySQL is a relational database while SQL is a standardized language for databases.
What are some advantages of MySQL
Flexibility , Power, Configuration and security.
What is a database
is a structured collection of data.A way to store data in a orderly maner
What does MySQL database contain
it containes tables wich contains rows. In the rows there are columns that contain data itself.
How can you interact with MySQL?
command line
GUI web interface
programming language
What is a Database Queries?
A request
What are some of the common MySQL commands?
ADD,CREATE , DELETE, DROP,INSERT
How do you create a database in MySQL?
CREATE DATABASE nameofdatabase;
How do you create a table using MySQL?
CREATE TABLE name_of_table (
author VARCHAR(128),
title VARCHAR(128);
How do you Insert Data Into MySQL?
INSERT INTO table_name (column1, …)
VALUES (value1, …);
How do you remove a column from a database?
ALTER TABLE table_name
DROP colum_name;
What is an index ? How you make an index
Index are used to achieve fast searches with the help of an index.
ALTER TABLE history
ADD INDEX(author(10));
. How to Delete specific Data From a MySQL Table?
In MySQL, the DELETE statement is used to delete records from a table:
DELETE
FROM table_name
WHERE column_name = value_name
15