Some of the most important SQL commands
- SELECT -Extract data from the database
- Update-Updates the data in the database
- Delete-deletes data from the database
- INSERT INTO-inserts new data into the database
- CREATE database-creating new databases
- alter database-Modify Databases
- CREATE TABLE-Creates a new table
- ALTER TABLE -Change (change) database table
- Drop Table-delete tables
- CREATE index-Creating indexes (search key)
- Drop Index-delete indexes
1 Select
Distinct
2 where
The following operators can be used in the WHERE clause: SQL uses single quotation marks to wrap text values (most database systems also accept double quotes). If it is a numeric value, do not use quotation marks.
operator |
Description |
= |
Equals |
<> |
Not equal to |
> |
Greater than |
< |
Less than |
>= |
Greater than or equal |
<= |
Less than or equal |
Between |
Within a range |
Like |
Search for a pattern |
The and and or operators are used to filter records based on more than one condition.
eg
(
OR
Firstname= ' William ' )
AND
lastname= ' Carter '
3 ORDER BY
3-sql command