Computer Blog
Introduction of SQL
- SQL stands for Structured Query Language
- SQL lets you access and manipulate databases
- SQL is an ANSI (American National Standards Institute) standard
What Can SQL do?
- SQL can execute queries against a database
- SQL can retrieve data from a database
- SQL can insert records in a database
- SQL can update records in a database
- SQL can delete records from a database
- SQL can create new databases
- SQL can create new tables in a database
- SQL can create stored procedures in a database
- SQL can create views in a database
- SQL can set permissions on tables, procedures, and views
To acquire basic knowledge about SQL students can take admission in best polytechnic college in Pune. In Polytechnic, MSBTE Curriculum Relational Database Management System subject is present in that every Organization like shopping mall, hospital, banking, institutes, Industry etc. needs to share huge amount of data in effective manner. This subject enables to create, store,modify and extract information from a database. Relational database management system has been developed to manage the information stored in the database. After learning this subject student will be able to use RDBM package as a backend for developing database applications.
SQL is divided into
- Data Defination Languages(DDL): Used to define how data will be stored Exa.Create,Alter,Drop,Truncate,desc,Rename
- Data Manipulation Languages(DML): Used to manipulate Exa. Insert, Update,delete
- Data Control Languages(DCL): Allows user to keep control on the operations taking place on tables. Exa. Savepoint, Callback, Commit
- Data Query Languages(DQL): To display the result Exa. Select
DDL Commands
- CREATE : Used to create Table in Database
create table Person(LastName varchar2(20),FirstName varchar2(20),Address varchar2(20),Age number(3));
- ALTER : Used to add column Table in Database
Alter table Person Add City varchar2(20);
- DROP : Used to delete table
Drop table Person;
- TRUNCATE : delete all rows of the table
Truncate table Person;
- DESC : table structure description
Desc Person;
- RENAME : Rename to old Table name to new Table Name
Rename Person to Person1;
DML Commands
- Insert : Records stored in Table of Database
insert into Person values('xyz' , 'abc', 'Shivaji Nagar', 20, 'Pune');
- Update : Used to Modify the data in a table
update Person set FirstName= 'abc1' where LastName ='xyz';
- Delete :-Delete Rows in table
Delete from Person where LastName='xyz';
DQL Commands
- Data Query Languages(DQL) is most concentrated focus of SQL for modern relational database users.
- SELECT command is used
Select * from Person;
Select FirstName,Age from Person;
Mrs. Chetana .P. Shravage
(Computer Department)
Pimpri Chinchwad Polytechnic