- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Get specific value of cell in MySQL
Let us first create a table −
mysql> create table DemoTable ( Name varchar(40), Score int ); Query OK, 0 rows affected (0.72 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('Chris Brown',78); Query OK, 1 row affected (0.13 sec) mysql> insert into DemoTable values('John Doe',88); Query OK, 1 row affected (0.11 sec) mysql> insert into DemoTable values('Carol Taylor',98); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values('David Miller',80); Query OK, 1 row affected (0.68 sec)
Display all records from the table using select statement −
mysql> select *from DemoTable;
This will produce the following output −
+--------------+-------+ | Name | Score | +--------------+-------+ | Chris Brown | 78 | | John Doe | 88 | | Carol Taylor | 98 | | David Miller | 80 | +--------------+-------+ 4 rows in set (0.00 sec)
Following is the query to get specific value of cell −
mysql> select Score from DemoTable where Name='Carol Taylor';
This will produce the following output −
+-------+ | Score | +-------+ | 98 | +-------+ 1 row in set (0.00 sec)
- Related Articles
- Update the content of a specific cell in MySQL
- Get only a single value from a specific MySQL row?
- How to get the count of a specific value in a column with MySQL?
- Get the count of a specific value in MongoDB
- Get the count of a specific value in MongoDB quickly
- MySQL query to update a specific cell to be empty
- Swap a specific column value in MySQL
- ORDER BY specific field value first in MySQL
- Fetch a specific column value (name) in MySQL
- Get the record of a specific year out of timestamp in MySQL?
- How to get a value from the cell of a Pandas DataFrame?
- Get the sum only from specific cells in MySQL?
- Get value of the bit at a specific position in BitArray in C#
- How to swap a specific field value in MySQL?
- How to get the data from a specific cell value (say 2nd row and 2nd column) inside a table in Selenium with python?

Advertisements