On this topic, I also see other methods on the Internet to solve the problem.However, from the perspective of performance and code volume, I have a better solution.Here we will share with you.The principle is actually very simple,Knowledge 1. Length
It is understood that the vast majority of developers have a thorough understanding of indexing, limited to the fact that most daily work has no chance, and there is no need to care about or understand indexing, when a query is too slow, you can
Use an SQL statement to add or delete a modified Field1. Add a fieldAlter table docdsp add dspcode char (200)2. delete a fieldAlter table table_NAME drop column column_NAME3. Modify the field typeAlter table table_name alter column column_name
After attaching a database, you cannot view the database relationship diagram or establish a database relationship diagram.My solution is as follows:1. Set the compatibility level to 90 (2005 to 90) (2000 to 80)Copy codeThe Code is as follows:USE
Two organizational structure tables (Organise) and wage distribution History Table (WagePerMonthHis)The two tables are associated through Organise. Item_id and WagePerMonthHis. OrgIdS.In the Organise table (hereinafter referred to as the O table),
1. multiline Functions, also known as Group Functions and Aggregate Functions1. Types of Group FunctionsAvg, count, max, min, stddev, sum, varianceAvg averageSelect avg (nvl (column 1, 0) from table 1Count calculates the number of rowsAggregate
First, a few nonsense words are as follows:(1) trigger is a special stored procedure. Its execution does not need to be explicitly called, but is triggered by some events, this is a bit similar to the Event Processing Mechanism in C. A trigger is
[Available] if the CD-KEY is required to install SQL server 2000, use regedt32 to open the registry, create a DWORD key in the following primary key [HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager]SafeDLLSearchMode and
To meet the above requirements, we can use the following methods, but the efficiency is quite different.First, create an index in the Order table:Create unique index idx_eid_odD_oidD ON Orders (EmployeeID, OrderDate DESC, OrderID DESC)Multiple
Menu:User_Role => RoleId => RoleMenuRoleMenu => MenuId => MenuThe business relationship between them is:After a user logs in, the user ID is used to obtain the User_Role list, and the roles included by the user are obtained.Use User_Role to find all
After the following stored procedure is created, you can directly call the stored procedure by page.Note: If the data volume is large and the performance requirement is high, please customize the processing.Copy codeThe Code is as follows:Alter
The following describes the solutions of a master in SQL.For your reference:Assume that a table contains three columns: Student ID, name, and school.Then insert data into the table.040501 Sun Ming Shandong University040502 Li Hao Shandong Normal
Solution:It is not possible to directly attach or attach data. It is certainly no problem to use script + to export data.Steps for transferring Sql2005 to Sql2000 1. Generate database scripts for version 2000 Manger studio in Sql2005-- Open "Object
Figure 1 wins the 10 Statement: SQL Server database SummaryA rough summaryAfter a period of study, I also had some knowledge about databases.Databases are basically composed of tables, relationships, and operations. For Beginners, the first thing to
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.