Home > Articles

MySQL Query Browser

This chapter is from the book

This chapter is from the book

3.3 Using the Query Window

This section describes how to use the different areas of the MySQL Query Browser query window.

3.3.1 Entering Queries

You can enter queries manually by typing them into the query area, or you can construct queries graphically by using the mouse to select tables, columns, or query components such as joins or WHERE clauses. If you drag multiple tables into a query, MySQL Query Browser constructs a join and tries to determine which columns to use for joining tables. It makes this determination based on foreign key relationships for InnoDB tables, and based on identical column names for other types of tables.

The query currently displayed in the query area can be executed by clicking the Execute button, by entering Ctrl-E at the keyboard, or by selecting a query execution option from the Query menu.

MySQL Query Browser provides syntax highlighting, which helps you see and understand the structure of queries more readily.

Queries are saved in your query history, and you can bookmark specific queries by dragging them to the bookmark browser. Previously executed queries can be recalled by using the bookmark browser or history browser. To use a previous query from one of these browsers, drag it from the browser area to the query area. Recalled queries are subject to further editing.

MySQL Query Browser also helps you create views. To use this feature, execute a SELECT statement and click the Create View button. This brings up a dialog for you to enter the view name. MySQL Query Browser creates a view with the given name, defined using the current SELECT statement. (You can also enter a CREATE VIEW statement directly.)

3.3.2 The Result Area

When you execute a query, its results appear in the query window result area. This area provides flexible result display and has the following characteristics:

  • For results that do not fit within the display area, scroll bars appear that allow you to navigate the result by scrolling. It’s also possible to toggle the result set display to use the entire query window.
  • If a result set is selected from a single table that has a primary key, the result set can be edited to modify the original table. (There is an Edit button in the result area that enables editing.) You can modify individual values within rows to update them, enter new rows, or delete rows.
  • The contents of a result are searchable. The result area has a Search button that provides access to Search and Replace dialogs. You can look for a given value in the entire result or within specific columns. Searches can be case sensitive or not, and they can be based on whole word or partial word matching.
  • A result is placed within the current tab of the result area, and each successive query overwrites the tab contents. To prevent this, you can create additional tabs for displaying multiple results and then switch between then.
  • You can split a result area tab horizontally or vertically to customize its display or to take advantage of additional features. For example, you can split a tab vertically, load two results into the left and right halves, and then click the Compare button to compare the results. MySQL Query Browser matches up the rows in the two halves to make visual comparison easier. You can also perform master-detail analysis using a split result tab. This type of analysis displays the relationship between master records in one table and the corresponding detail records in another table.

3.3.3 The Script Editor

The query area is designed for entry and execution of single SQL statements. To extend this capability, MySQL Query Browser includes a Script Editor that allows you to edit, execute, and debug scripts that consist of multiple statements.

The Script Editor presents an interface that is displayed as a tab in the result area. To activate it, select either New Script Tab or Open Script ... from the File menu, depending on whether you want to create a new script or edit one that is stored in a file.

The Script Editor offers these features:

  • Syntax highlighting
  • Line numbering
  • Script execution
  • Debugging options such as single-stepping and breakpoints

3.3.4 Stored Routine Management

MySQL Query Browser assists you in managing stored procedures several ways:

  • It helps you create new routines by prompting for a routine name and taking you to the Script Editor and providing a template for the routine definition.
  • You can edit existing routines.
  • The database browser shows stored routines in a database when you expand the display for the database. If you expand the display for a routine, the browser shows the routine’s parameters.

3.3.5 The Object and Information Browsers

The right side of the query window contains two browsers: the Object Browser and the Information Browser. The area for each browser contains several sub-browsers.

The area for the Object Browser provides access to databases and queries:

  • The database browser (schemata browser) displays a hierarchical view of your databases. It lists each database, with the default database name highlighted so that you can tell at a glance which one is current. The default database is the one used for references to tables and routines that are not qualified with a database name.

    The display for any database can be expanded to show the tables and stored routines within the database. Likewise, expanding a table display shows its columns and expanding a routine’s display shows its parameters.

    Double-clicking a database name selects it as the default database. Double-clicking a table name enters a SELECT * FROM table_name statement in the query area.

    Right-clicking in the database browser brings up a menu for additional capabilities:

    • Right-click in the browser to create a new database or table.
    • Right-click on a database name to drop the database.
    • Right-click on a table name to drop the table or edit it with the MySQL Table Editor.
  • The bookmark browser lists those queries that you have bookmarked. You can organize bookmarks hierarchically by creating folders and moving, removing, or renaming bookmarks.
  • The history browser contains previously issued queries, hierarchically organized by day.
  • You can drag queries from the bookmark or history browser to the query area for re-execution. Double-clicking a query also enters it into the query area.

The area for the Information Browser provides access to documentation, query parameters, and current-transaction information:

  • The syntax browser lists SQL statements. Double-clicking on a statement displays syntax information for it from the MySQL Reference Manual. The information appears in a tab in the result area.
  • The function browser lists the built-in functions that you can use in SQL statements. Double-clicking on a function displays the description for it from the MySQL Reference Manual. The information appears in a tab in the result area.
  • The parameter browser displays query parameters.
  • The transaction browser shows the statements that are part of the current transaction.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020