SQL commands are the instructions used to communicate with a database to perform tasks, functions, and queries with data.
SQL commands can be used to search the database and to do other functions like creating tables, adding data to tables, modifying data, and dropping tables.
Here is a list of basic SQL commands (sometimes called clauses) you should know if you are going to work with SQL.
SELECT and FROM
The SELECT
part of a query determines which columns of the data to show in the results. There are also options you can apply to show data that is not a table column.
The example below shows three columns SELECT
ed FROM
the “student” table and one calculated column. The database stores the studentID, FirstName, and LastName of the student. We can combine the First and the Last name columns to create the FullName calculated column.
- SELECT - extracts data from a database.
- UPDATE - updates data in a database.
- DELETE - deletes data from a database.
- INSERT INTO - inserts new data into a database.
- CREATE DATABASE - creates a new database.
- ALTER DATABASE - modifies a database.
- CREATE TABLE - creates a new table.
- ALTER TABLE - modifies a table
- DROP TABLE - deletes a table
- CREATE INDEX - creates an index (search key)
- DROP INDEX - deletes an index
0 Comments