For teacher_details Table
Query-1 : INSERT Into teacher_details Values(101, ‘Anurag’, ‘TGT’); Query-2 : INSERT Into teacher_details Values(102, ‘Anoop’, ‘PGT’); |
For student_details Table
Query-1 : INSERT Into student_details Values(1, ‘Saurav’, 50); Query-2 : INSERT Into student_details Values(2, ‘Rakesh’, 50); |
To display the data, execute the below command.
Query : SELECT * From student_details; |
NOTE : student_details table has the following structure
Example Query : CREATE Table student_details(Roll_no int, Name varchar(20), Marks int); |
If while entering the values in the tables created using above query, data is inserted without keeping the data type in mind, an un-executable query will be generated.
Example Query : INSERT Into student_details Values(‘Shayam’,’Ram’,30); |
Here, in place of integer data type, character(‘Shyam’) is used which is not acceptable.