SQL Study Notes: server configuration-how to use Enterprise Manager

Source: Internet
Author: User

Before that, I was not familiar with the basic knowledge of SQL2000. I had to download other people's VC source code, but the SQL configuration was poor, resulting in the failure to test the program. In addition, there are many methods on the Internet, but they do not seem to be completely complete. Many places have not told you how to do this ....

 

Next, I created a student database, which is used to record the student table of the "name, class, language, mathematics, and English" field. follow these steps:

 

1. Open the Enterprise Manager first:

 

 

 

2. Set the database name, which will be used later in the initial function of the program:

 

 

3. Set the data file path, size, and other parameters. Here you can also import other existing. MDF databases. Of course, here I create a new one:

 

 

4. Create a database on the SQL Enterprise Server. After the configuration is complete, open the SQL query analyzer to create a table from the menu/tool:

 

A. How to use the "use ***" statement. Example:

 

Use student

 

My personal understanding is described in plain language. For example, if the "master" database contains a "sysfiles" table (which can be viewed in the Enterprise Manager), if we need to operate this table sysfiles, use use to "pick up" and then perform the operation. (However, you can directly operate tables in different databases without using it. If you use it, you cannot operate tables in other databases. Which of the following enthusiastic friends knows this, please help me explain it, thank you !)

 

B. How to use the "CREATE TABLE ***" statement. Example:

Use student </P> <p> Create Table db_info <br/> (<br/> [name] varchar (30 ), <br/> [Class] varchar (30), <br/> [language] int, <br/> [mathematics] int, <br/> [English] int, <br/> constraint db_iinfo primary key (name) <br/>) </P> <p>

 

Select the student database and create a table named db_info. The fields include name (30 characters), Class (30 characters), and Chinese (4 bytes ), mathematics (4 bytes), English (4 bytes), the last sentence is to set the name as the primary key (no duplicates allowed ).

If you are a little familiar with the C/C ++ language, these SQL statements should be easy to understand. Just pay attention to the syntax and specifications!

 

C. "select * From **" to view the table results

Select * From db_info

 

 

 

 

 

 

 

 

Enter these two statements in the SQL query analyzer and click "execute query (F5)". In this case, I think it is necessary to master the line program design, it's almost done .....

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.