SQL Komutlar

posted in: Web & Comp. | 0

Some of The Most Important SQL Commands

  • 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

Operators in The WHERE Clause

The following operators can be used in the WHERE clause:

Operator Description
= Equal
<> Not equal. Note: In some versions of SQL this operator may be written as !=
> Greater than
< Less than
>= Greater than or equal
<= Less than or equal
BETWEEN Between an inclusive range
LIKE Search for a pattern
IN To specify multiple possible values for a column

SQL ORDER BY Syntax

SELECTcolumn_name, column_name
FROM table_name
ORDER BY column_name ASC|DESC, column_name ASC|DESC;

SQL INSERT INTO Syntax

It is possible to write the INSERT INTO statement in two forms.

The first form does not specify the column names where the data will be inserted, only their values:

INSERTINTOtable_name
VALUES (value1,value2,value3,…);

The second form specifies both the column names and the values to be inserted:

INSERTINTOtable_name (column1,column2,column3,…)
VALUES (value1,value2,value3,…);

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.