Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
Q. What is SQL?
Ans: SQL stands for Structured Query Language.
It is used for storing, manipulating and retrieving data in database.
SQL keywords are NOT case sensitive: select is the same as SELECT
Q. 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
DBMS: Database Management System
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
Ex: 1. CREATE A TABLE
create table employee( employee_id int, first_name varchar(50), last_name varchar(50), hourly_pay decimal(5,2), hire_date date ); 2. SELECT ELEMENTS From table select * from employee;