SQL Commands Flashcards
What does CREATE TABLE do
The CREATE TABLE command can add a new table to an existing database
What does ALTER TABLE DO
ALTER TABLE is used to add,change, or remove fields on an existing table it also lets you define primary and foreign keys
What does DROP TABLE do
The DROP TABLE command deleted an entire table including all the data stored in it
What does CREATE DATABASE do
The CREATE DATABASE command allows you to begin a brand new database
what does CREATE VIEW do
The CREATE VIEW command creates a virtual table populated from an SQL statement result set
What does CREATE INDEX do
the CREATE INDEX command creates an index within a table which can be used to accelerate the speed of query retrevial time
What does SELECT do
The SELECT command let’s you view specific information you want from the database used with *
What does WHERE do
The WHERE command let’s you narrow your query to only the results you want
What does UPDATE AND SET do
The UPDATE command makes changes to existing records in a table it’s usually used with the SET command which tells the database which changes to make
What does DELETE do
The DELETE command deletes record from a table
What does the INSERT INTO and VALUES command do
These commands work together to add records to an existing table the INSERT INTO command tells the database which table should store the new record VALUES tells the data base what to write
What does GRANT do
The GRANT command gives a user specific permissions to a specific database object and it part of the data control language within SQL
What does REVOKE DO
the REVOKE command removes specific permissions to specific database objects and is also part of the data control language within SQL