SQL stands for Structured Query Language ,it is used to communicate with database.According to ANSI it is the standard language for relational database management systems.Some relational database management systems that used SQL are MySQL ,ORACLE,Sybase etc.The standard SQL commands "SELECT","CREATE","UPDATE","DELETE" are used by the most of the database systems .
- SQL can create stored procedures in a database.
- can create views in database.
- Select is used for to select total data from the table.
- Create is used for to create database/tables.
- Insert into is used for to insert the data into tables.
- Update is used for to update the data in a database.
- Delete is used for to delete the data in a database.
- Alter is used for to modify the database/table.
- Drop is used for to delete a table
The most commonly used SQL command is select.It is used for to retrieve the data from a table in database.
Syntax:
->"select column_list from table_name";
- table_name is name of the table from which table you want to retrieve the data.
- In column_list place we should write column names.
- we can write many column names in column_list place.
- using above query we can retrieve all records from table in a database
database table employ;
id | first_name | last_name | age | Qualification | Company |
100 | chandra | sekhar | 20 | B.Tech | Cgi |
101 | raju | rajendra | 30 | B.Sc | TCS |
102 | hari | reddy | 32 | B.E | WIPRO |
103 | Shekar | kammula | 25 | MCA | |
104 | Priya | aanand | 45 | MBA | hcl |
"select first_name from employ";
output:
first_name
chandra
raju
hari
Shekar
Priya
- SQL is non case sensitive so we can write small or capital letters.
this is good information visit
ReplyDelete