Structure query
language is a computer language aimed to manipulate , store and query data stored in relational
database system. The first incarnation of sql appeared in 1974, when a group in
IBM developed the first prototype of relational database. The select statement
is the core of sql and is likely that the vast majority of your sql commands
will be sql statements.
The structure query language that
can be used on each one of the major RDBMS today is in different flavors
because sql commands standard is fairly complex and not practical to implement
entire standards.
Sql commands:
Sql commands
are instructions that are used to communicate with database to perform specific
task that work with data. Sql commands can be used not only for searching the database but also
perform the various functions like create tables , add data to tables, drop
table and modify tables.
Following are
the major categories of sql command:-
1. DDL (data definition language)
2. DML (data manipulation language)
3. DCL (data control language)
4. TCL (transaction control language)
Sql functions:-
AVG: average of the collumns
COUNT: number of records
MIN: minimum of collumns
MAX: maximum of collumns
SUM: sum of the collumns
we cover common string function seen in
SQL. Different RDBMS may employ different string functions, and there may also
be differences in the syntax for each RDBMS even when the function call is the
same. All such differences are explained in each section. Please note that we
do not list all possible SQL string functions in this tutorial. Rather, the
most commonly used ones are covered.
- sql cast
- sql convert
- sql concatenate
- sql substring
- sql instr
- sql trim
- sql
length
- sql replace
- sql to_date
SQL OPERATORS:-
There are two types of operators in sql
-
Comparison operators:- comparison operators
are used to compare the column data with specific values in a conditions.
-
Logical operators:- there are 3 logical
operators namely AND , OR , NOT.