Perform Simple SQL Queries Against a Database Flashcards

1
Q

Perform Simple SQL Queries Against a Database

A

mysql -u root -p

SHOW DATABASES;

USE emails;
SHOW TABLES;
DESCRIBE users;

INSERT INTO users (userID, UserFirstName, UserLastName, userEmailAddress) VALUES (0001, “John”, “Smith”, “johnsmith@example.com”);

DESCRIBE users;

SELECT * FROM users

DELETE FROM users WHERE userID=2;

UPDATE users SET userLastName=”Jones”, userEmailAddress=”janejones@example.com” WHERE userID=2;

create user dick@”localhost” identified by “password”;

grant select on test.* to tom@’localhost’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly