How to get table properties quickly from a database write JavaBean

Source: Internet
Author: User
Tags access database ultraedit

I used to design a database of a pair of tables in the database to convert the table to JavaBean, and also a slow to play the efficiency is really low, or the teacher is more intelligent learning.

The database visualizer I used was Navicat Premium, UltraEdit (formerly used by notepad++, found to be useful with this tool).

Mysql My database is db_training, which represents tb_patent.

What is the INFORMATION_SCHEMA database?

The "INFORMATION_SCHEMA database" is a MySQL-band that provides a way to access database metadata. What is meta data? Metadata is data about the data, such as the database name or table name, the data type of the column, or access permissions.

SELECT column_name FROM information_schema.`COLUMNS` WHERE TABLE_SCHEMA=‘db_training‘and TABLE_NAME=‘tb_patent‘

Table_schema the database name to check
TABLE_NAME the tables in the database to be checked.

Copy column_name to UltraEdit inside

Click on column mode and enter private String first

Ctrl+r change line character to; add newline character

Is the last one not; However, the JavaBean attribute naming format is best used with the hump naming method.

How to get table properties quickly from a database write JavaBean

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.