0% found this document useful (0 votes)
4 views10 pages

MySQL Quick Facts

The document provides step-by-step instructions on how to view and edit table data, column definitions, and SQL statements in a database management tool. It includes guidance on using snippets, handling errors, and managing SQL scripts, such as opening, saving, and executing them. Additionally, it outlines common causes of errors and how to navigate between open files.

Uploaded by

mckc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views10 pages

MySQL Quick Facts

The document provides step-by-step instructions on how to view and edit table data, column definitions, and SQL statements in a database management tool. It includes guidance on using snippets, handling errors, and managing SQL scripts, such as opening, saving, and executing them. Additionally, it outlines common causes of errors and how to navigate between open files.

Uploaded by

mckc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

How to view the data for a table

1. Right-click on the table in the Object Browser window.


2. Select the Edit Table Data command to display it in a Result tab.
How to edit the data for a table
1. View the data.
2. Use the buttons at the top of the Result tab to insert, update, and
delete rows.
3. Click the Apply button at the bottom of the tab to apply the
changes.
Note
 You can also cancel the changes for a table by clicking the Cancel
button.
How to view the column definitions
1. Right-click on the table name in the Object Browser window and
select the Alter Table command.
2. Select the Columns tab at the bottom of the window that’s
displayed.
How to edit the column definitions
1. View the column definitions.
2. Use the resulting window to add new columns and modify and
delete existing columns.
How to enter a SQL statement
1. Press the Ctrl+T keys or click the Create New SQL Tab button in the
SQL Editor toolbar to open a new code editor tab.
2. Double-click a database in the Object Browser window to select
it.
3. Type the SQL statement into the code editor tab.
How to execute a SQL statement
 Select the QueryExecute Current Statement command, press the
Ctrl+Enter keys, or click the Execute Current Statement button in
the code editor toolbar.
 If a SELECT statement retrieves data, the data is displayed in a
Result tab.
How to use a snippet
1. Select the snippet in the Snippets tab and then click the Insert
Snippet button at the top of the tab to enter the snippet into a code
editor tab.
2. Edit the snippet code so it’s appropriate for your SQL statement.
How to replace code with a snippet
1. Select the code in the code editor tab.
2. Select the snippet you want to replace the code with.
3. Click the Replace Current Text button.
How to create your own snippet
1. Enter the code for the snippet into a code editor tab.
2. Select the category where you want to save the snippet.
3. Click the Add New Snippet button and enter a name for the
snippet.
How to delete a snippet
1. Select the snippet in the Snippets tab.
2. Click the Delete Snippet button.
Common causes of errors
 Having the wrong database selected
 Misspelling the name of a table or column
 Misspelling a keyword
 Omitting the closing quotation mark for a character string
How to open a SQL script
1. Click the Open SQL Script File button in the SQL Editor toolbar, or
press the Ctrl+Shift+O keys.
2. Use the Open SQL Script dialog box to locate and open the SQL
script.
How to switch between open files
 Select the appropriate tab.
How to cut, copy, and past code
 Use standard techniques.
How to save a new SQL script
1. Click the Save button in the code editor toolbar or press Ctrl+S.
2. Use the Save SQL Script dialog box to specify a location and
name for the file.
How to save a modified script to a new file
1. Press the Ctrl+Shift+S keys, or select the FileSave Script As
command.
2. Use the Save SQL Script dialog box to specify a location and
name for the file.
How to run an entire script
 Press the Ctrl+Shift+Enter keys or click the Execute SQL Script
button.
How to run one statement within a script
1. Move the insertion point into the statement you want to execute.
2. Press the Ctrl+Enter keys or click the Execute Current Statement
button.
How to run two or more statements in a script
1. Select the statements you want to execute.
2. Press the Ctrl+Shift+Enter keys or click the Execute SQL Script
button.
Notes
 The results of each statement that returns data are displayed in a
separate Result tab.
 If a script contains more than one statement, you must code a
semicolon at the end of each statement.

You might also like