To view data of a table,
- First Create a table. Here's how - Create a table
- Then insert data in the table. Here's how - Insert data into Table
- Selected columns and All rows
1: select column1,column2, column3, ..., columnN from <table_name>;
Examples -
1. select Roll_no,Name from student;
1: select Name,Phone_Number from student;
- Selected rows and All columns
1: select *from <table_name> 2: where <condition>;
Examples -
1: select *from student 2: where Name='Trunks';
1: select *from student 2: where Name='Naruto Uzumaki';
- Selected rows and Selected columns
1: select col1,col2,...,colN from <table_name> 2: where <condition>;
Examples -
1: select Name,Phone_Number from student 2: where Name='Trunks';
1: select Roll_no,Name from student 2: where Roll_no=15094;
- All rows and All columns
1: select *from <table_name>;
Examples -
1: select *from student;
No comments:
Post a Comment
If u need any help,