You are on page 1of 5

Key Points

 No space while defining column name and


table name
 Numeric value  INT datatype
 Alphanumeric value  VARCHAR datatype
 One PK should be there
 Insert records and save
 (INSERT, UPDATE and DELETE)

Queries
 SELECT all
 SELECT * FROM TableName; (To retrieve
all the records)
 * Means all the columns
 For specific column: Instead of * write
column name
 SELECT Column name FROM Tablename;


 Arrange or Sort data  ORDER BY clause
 SELECT * FROM TableName ORDER BY
Column name;
 By default, Asc


 To define Desc  DESC


 WHERE Clause
 To add condition
 SELECT * FROM TableName WHERE
condition;
 Condition  Column name O condition
 Relation operator: = > < >= <=
 Section = ‘B’
 IT_marks > 20
 Note: Text use ‘‘


 Wildcard
 LIKE Operator with WHERE Clause
 SELECT * FROM TableName WHERE
Column name LIKE Condition;

You might also like