DATABASE- Insert Queries Method
Day 40 (26-03-2025)
u Insert Queries Method :-
I. Insert All record
II. Insert particular column
III. Inliner Insert
1. Insert All record :-
Syntax:- INSERT INTO TABLENAME VALUE(RECORD)
EX-INSERT INTO EMP VALUES(101,'SWARUP');
INSERT INTO EMP VALUES(102 ,'rahul');
INSERT INTO EMP VALUES(103 ,'Somesh');
INSERT INTO EMP VALUES(104 ,'yash');
INSERT INTO EMP VALUES(105 ,'anand');
INSERT INTO PARTICULAR COLUMNS
SYNTAX:- INSERT INTO TABLENAME(COL NAME)VALUES(RECORD);
Ex.INSERT INTO Student (NAME) VALUES ('SANTA ');
l Inline Insert :- Insert mutilple record in a single line
Syntax:-
INSERT INTO TABLENAME VALUES(RECORD),(RECORD),------------
EX-INSERT INTO student VALUES(202,'Riddhima'),(201,'tuktuk');
l DISPLAY DATARECORDS:-(USING SELECT QUERIES)
1. Display all records
2. Display particular columns
3. Display records with conditions
1. Display All records :- syntax
Select * from
* this is know as wild card character
2. Display particular columns
Syntax:-
SELECT COLUMNNAME FROM TABLENAME
Ex-SELECT name FROM student;
3. Select with Specify condition:-
A. Where clause :- using condition
B. Between clause :- using range condition
C. Order by clause:- arrange data records
D. Group by clause:- duplicate datarecords
E. In clause :- scearch mutilple string
Q. Display all records of student whoes roll no. Is 101?
Ex- SELECT* FROM student WHERE roll=101;
SELECT* FROM student WHERE name='tuktuk';
Comments
Post a Comment