Getting started with SQuirreL SQL Client 2 --- plug-in use, squirrel2 ---

Source: Internet
Author: User
Tags sql client

Getting started with SQuirreL SQL Client 2 --- plug-in use, squirrel2 ---
Next article: getting started with SQuirreL SQL Client 1
1. The directory where the plug-ins are stored is under the installation directory, and The./plugins/jar folder contains the plug-in instructions.

* ** It is strongly recommended that you refer to the instructions when using the plug-in. That is more accurate and detailed
Ii. Plug-in usage and Configuration
1. Automatic completion plug-inDocument: plugins \ codecompletion \ doc
The effect is as follows:
Usage: CTRL + SPACE usage:

Completion works on almost all SQL and DDL constructs:

  • Key words, this includes des SQL standard keywords as well as those key words delivered by the JDBC driver.

  • Tables

  • Columns

  • Views

  • Stored procedures, completion generates the complete JDBC call syntax including templates for parameters.

  • Catalogs

  • Schemas


Modify: Because CTRL + SPACE conflicts with the input key, a new shortcut key needs to be defined. Modification Method: Use winrar to open./plugins/ Codecompletion. jar, Modify and replace Resources. properties. The modification is as follows:
Description: Usage CTRL + 1As a shortcut.

Ii. DBCopy plug-inDocument: plugins \ Dbcopy\ Doc \ readme.html
This plugin in provides the ability:
  • Copy database tables (indexes and primary/foreign keys) between database sessions (The sessions can be betweendifferent databases)

    That is, you can directly migrate one or more data tables in the same database or different databases! In this way, we can save the tedious operations of creating tables in different dialects, exporting data to txt, and then importing data to another database.

    Tips: You have not tried to move a data table with a large amount of data. At the same time, you need to check the correctness of the migration result table to see the field type of the table and whether there are garbled characters.


Operation Method:

There are two new menu items available by right-clicking on certain database objects in the object tree. They are "Copy Table" and "Paste Table". They are accessed as follows:

  1. Open two session windows (same or different database types)

  2. Select a schema/user in the object tree of one session and click on TABLE to expose the tables in that schema.

  3. Select one or more tables in that object tree.

  4. Right-click on the hightlighted tables and choose "Copy Table ".

  5. Bring the other session window into focus and select a schema/user to copy the table (s).
  6. Right-click on the selection and choose "Paste Table"
  7. A Progress dialog will be displayed with two bars. the top bar indicates which records are being copied from the current table. the bottom bar indicates which table is being copied and the overall progress of the copy operation.




Iii. Automatic Correction and abbreviated plug-inDocument: plugins \ syntax \ doc \, this plug-in is also used Syntax highlighting.
Scope of application: customize some common input operations. The scenario is as follows: 1. I often compress FROM into a FORM. With this function, you don't have to worry about it. After you enter FORM, the program will automatically change to FROM. 2. query the number of data in a table. select count (1) from xx. With the abbreviation function, we can customize it, such as: SCF --> select count (1) FROM, when you enter SCF and press a space, it is automatically expanded to select count (1) FROM
This plug-in is playable.
The pop-up configuration is as follows:
* ** In 1, the automatic abbreviation correction window is opened. 2, indicating that the automatic correction and abbreviation are enabled. ***

Iv. placeholder plug-in document: plugins \ sqlparam \ doc \ placeholder is personal understanding, and the plug-in name is actually sqlparam
Applicability: query data under multiple categories. Only one category is queried at a time. Eg.
SELECT * FROM citys where CITY_ID = '201312 ';
SELECT * FROM citys where CITY_ID = '201312 ';
SELECT * FROM citys where CITY_ID = '201312 ';
SELECT * FROM citys where CITY_ID = '201312 ';
* *** Of course, the SQL statement in the actual scenario is more complex than this one. Generally, we write multiple operations or modify them based on the original one. Then these SQL statements are saved in a file and can be directly loaded next time.
If the placeholder plug-in is used, the SQL statement is as follows:
SELECT * FROM citys where CITY_ID =: cityId;
Run the command directly. An input window is displayed. After you click OK, the variable is replaced and then queried.

Note: Leave a space before the placeholder.
Personal method: You can use sqlparam and bookmark together to achieve better results and reuse.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.