TestingDocs.com
    Software Testing website
    • Automation
      • Selenium
      • JBehave Framework
    • Tutorials
      • MySQL Tutorials
      • Testlink
      • Maven
      • Git
    • IDEs
      • IntelliJ IDEA
      • Eclipse
    • Flowcharts
      • Flowgorithm
      • Raptor
    • About

    MySQL

    Retrieve Information from a MySQL Table

    Overview

    We can retrieve information from a MySQL database table using the SELECT statement. We will the table created in this example:

    https://www.testingdocs.com/insert-data-into-a-mysql-database-table/

    SELECT statement is used to retrieve information from the database table. The statement supports many clauses.

    Select all rows

    To retrieve all the rows in the table we use the following statement:

    SELECT  * FROM <table_name>

    For example, to retrieve all the rows in the table named supplier,

    SELECT * FROM supplier;

    SELECT * FROM testdb.supplier;

    The * in the command will fetch all the columns in the table.

     

    Retrieve All Rows MySQL

    Select particular columns

    We can specify the columns to show particular columns in the query output. For example, if we want only the supplier id column in the query result, we can use the following query.

    SELECT supplier_id FROM supplier;

    Select particular Rows

    The WHERE clause if specified in the SELECT statement returns only the rows satisfied by the WHERE condition/(s).

    —

    MySQL Tutorials

    MySQL Tutorials on this website:

    https://www.testingdocs.com/mysql-tutorials-for-beginners/

    For more information on MySQL Database:

    https://www.mysql.com/

    Related Posts

    Stellar Converter for Database Tool

    MySQL /

    Stellar Converter for Database

    Stellar MySQL Log Analyzer

    MySQL /

    Stellar Log Analyzer for MySQL

    Stellar Repair for MySQL

    MySQL /

    Stellar Repair for MySQL

    MySQL /

    How to secure your SQL Database: Tips and Tricks

    Stellar Converter for Database

    MySQL /

    Database Converter Tools

    ‹ Insert Data into a MySQL Database Table› Upgrade MySQL Server on Windows

    Recent Posts

    • ChatGPT Plans Free and PlusChatGPT Subscription Plans
    • Stellar Converter for Database ToolStellar Converter for Database
    • Stellar MySQL Log AnalyzerStellar Log Analyzer for MySQL
    • Stellar Repair for MySQLStellar Repair for MySQL
    • ChatGPT IntroductionChatGPT Capabilities
    • How to secure your SQL Database: Tips and Tricks
    • ChatGPT4 Conversational AI FeaturesChatGPT4 Conversational AI Features
    • Trends in Software EngineeringShaping the Future of Development: Exploring Key Trends in Software Engineering
    • Java PerformanceImproving Java Performance with Multithreading
    • QDrant Vector DatabaseOpen-source Vector Databases
    • Difference between PHP and JavaScript?
    • Bing AI Browser Web ContentBing Conversation Styles
    • ChatGPT PreviewChatGPT Introduction
    • Open Source AI Frameworks TensorFlowOpen Source AI Frameworks
    • Artificial Intelligence Tools

    Back to Top

    Links

    • Contact
    • Privacy Policy
    • Cookie Policy

    www.TestingDocs.com