Perform Simple SQL Queries Against a Database Flashcards Preview

RHCE > Perform Simple SQL Queries Against a Database > Flashcards

Flashcards in Perform Simple SQL Queries Against a Database Deck (1):
1

Perform Simple SQL Queries Against a Database

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';