I. Commands and Keywords are not case sensitive.
II. Table name and Column name are not case sensitive.
III. Data types are not case sensitive.
IV. Data in the table are case sensitive.
V. Constraints are not case sensitive.
Commands are the main action words or verbs that start a SQL statement to instruct the database engine on what operation to perform.
- List:
SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,TRUNCATE,GRANT,REVOKE,COMMIT,ROLLBACK.
Keywords are reserved words that have a special structural meaning within a statement to help construct clauses or specify conditions.
- List:
FROM,WHERE,AND,OR,NOT,IN,LIKE,BETWEEN,IS,NULL,INTO,VALUES,TABLE,AS,ORDER,BY,GROUP,HAVING.
-
Example (UPPERCASE):
SELECT * FROM student WHERE age = 23;
-
Example (lowercase):
select * from student where age = 23;
- Example (Mixed Case):
SeLeCt * FrOm student WhErE age = 23;
All three options run exactly the same way on the server.
The names given to database tables when they are created.
- List:
student,employee,dept,orders,products.
The identifiers assigned to individual vertical fields inside a table.
- List:
name,age,gender,marks,id,salary.
- Example (lowercase references):
SELECT name, age FROM student;
- Example (UPPERCASE references):
SELECT NAME, AGE FROM STUDENT;
- Example (Mixed Case references):
SELECT NaMe, AgE FROM StUdEnT;
The structural data format classifications assigned to columns during table definitions.
- List:
CHAR,VARCHAR2,NUMBER,DATE,INT,FLOAT.
- Example (lowercase Data Types):
CREATE TABLE demo_one (
username varchar2(20),
user_id int
);
- Example (UPPERCASE Data Types):
CREATE TABLE demo_two (
username VARCHAR2(20),
user_id INT
);
The literal alphanumeric text values saved inside individual row cells.
- List:
'Basha','Male','ECE','Apple','Cat'.
-
Baseline Data Present in Table: | NAME | AGE | GENDER | | --- | --- | --- | | Cat | 23 | Male |
-
Example Query A (Exact Match):
SELECT * FROM student WHERE gender = 'Male';
Result: Returns Row. (Matches literal table data)
- Example Query B (Mismatched Case):
SELECT * FROM student WHERE gender = 'male';
Result: no data found (lowercase 'm' does not match uppercase 'M')
- Example Query C (Mismatched Case):
SELECT * FROM student WHERE gender = 'MALE';
Result: no data found
The validation rules or integrity checks applied to columns to restrict what kind of data can be entered.
- List:
PRIMARY KEY,NOT NULL,UNIQUE,CHECK,FOREIGN KEY,DEFAULT.
- Example (lowercase Constraints):
CREATE TABLE verification_one (
id INT primary key
);
- Example (UPPERCASE Constraints):
CREATE TABLE verification_two (
id INT PRIMARY KEY
);