MYSQL Flashcards
What is it called when you add records to a table
Populate the table
What is a data base?
An organized collection of data
Display multiple things from multiple tables
Name of table.title1,title2,name of table.table1,table2
Change a field
ALTER TABLE tablename CHANGE name1 name2 VARCHAR(10);
What do you do to stuff in a data base?
Initialize
Show a table
SHOW TABLES;
Show a column
SHOW COLUMNS FROM dogs.nDogs
What is a primary key
A method that the DMS uses to select specific records
How to add a primary key
ALTER TABLE nFogs ADD PRIMARY KEY (sn);
Add a uni key
ALTER TABLE nDogs ADD UNIQUE (sn);
What is MUL
Not a primary or unique key. Multiple instances
Anchor tags
SELECT make FROM vehicle WHERE make REGEXP '^(M|D)' beg M OR D '(^M|D)' beg M con D 'S$' end of word 'A' anywhere
Create a variable
SET @variable=100;
Remove a NULL field
DELETE FROM vehicle WHERE colour is NULL;
GROUP BY
SELECT make, model, FROM vehicle GROUP BY model;