Summary of problems recently encountered when using access databases:
I. Usage of like in access
The wildcard usage of like in access is as follows:
"?" Represents any single character; "*" Represents zero or multiple characters; "#"
What is the difference between the SQL Server server and the server group?
A server group is a logical concept, similar to a group of colleagues, friends, and family in a class or QQ. Generally, there are n students in the class. Students are
CopyCode The Code is as follows: Create Table test3 (ID int primary key not null
Identity (1, 1), uname varchar (20), uage INT );
Create Table test3_bak (ID int primary key not
Null identity (1, 1), bid int, uname varchar (20 ),
Uage int, active
Run the following script to view the size of database index fragments:
CopyCode The Code is as follows: DBCC showcontig with fast, tableresults, all_indexes, no_infomsgs
The following scripts are used to process maintenance tasks:Copy codeThe Code
Below I have excerpted a text section about the trigger in the SQL Server official tutorial, which is a useful text description.
You can define a trigger that will be executed whenever the insert statement is used to insert data into the table.
When
Official reference documents
Http://technet.microsoft.com/zh-cn/library/ms187074%28SQL.90%29.aspx
They act between comparison operators and subqueries, and are similar to exists, not exists, in, not in, and other logical meanings. These syntaxes are
Use JavaScript Arrays for calculation,
Code As follows:
Copy code The Code is as follows: Use tempdb
Go
If (object_id ('fn _ getarray') is not null)
Drop function DBO. fn_getarray
Go
Create Function fn_getarray (@ every 1 varchar (8000), @ every 2
CopyCodeThe Code is as follows :/*************************
How to delete database backup in SQL Server 2000
**************************/
-- You can first back up the database [testdb]
Backup database testdb to disk = 'e: \ Database Backup \
That is, when logging on to a website as a tourist, the shopping cart is stored as a cookie, and the shopping cart information is stored in the database as a logon user, if the shopping is completed as a tourist and then the shopping continues, the
CopyCodeThe Code is as follows: use master
Declare @ dbname varchar (60)
Declare @ backsql varchar (1000)
Declare mycursor cursor
Select [name] From sysdatabases
Where [name] Not in ('master', 'model', 'msdb', 'tempdb ')
Order by [name]
Open
Method 1: (this is the most commonly used, because many of the content in a large segment uses data types such as text ntext, and we usually Replace the content in it)
Varchar and nvarchar support replace, so if your text does not exceed 8000,
This includes prompting pending operations, shrinking databases, compressing databases, transferring databases to new users with existing user permissions, checking backup sets, and restoring databases during installation.
(1) pending
Copy codeThe Code is as follows: --> Title: generate a sequence number.
--> Author: wufeng4552
--> Date: 09:02:08
If object_id ('f _ split ') is not null drop function f_split
Go
Create function f_split
(
@ S varchar (8000), -- string to be
========================= Page ================================ ====
Copy codeThe Code is as follows:/* query data by page */
Create procedure [dbo]. [GetRecordSet]
@ StrSql varchar (8000), -- Query SQL, such as select * from [user]
@ PageIndex int,
The first error "SQL Server does not exist or access is denied" is usually the most complicated. There are many causes of the error and there are also many problems to check.
. Generally, there are several possibilities:
1. the SQL Server name or IP
Copy codeThe Code is as follows: create proc commonPagination
@ Columns varchar (500), -- Name of the column to be displayed, separated by commas
@ TableName varchar (100), -- Name of the table to be queried
@ OrderColumnName varchar (100), -- Name
For the relationship between them, refer to the following figure to show the relevant test examples:
The test examples are as follows:
Copy codeThe Code is as follows: use tempdb
Go
If (object_id ('t1') is not null) drop table t1
If
1. SQL server 2005's performance tools include SQL Server Profiler and database engine optimization consultant. Excellent Dongdong and must be used skillfully.
2. When querying SQL statements, enable "show estimated execution plans" to analyze the
First, add a data table to a partition table:
[Dbo]. [SP_Helper_Partition_Add]
@ SrcTable nvarchar (256), table to be added
@ DestTable nvarchar (256), target table
@ IdxOnDest nvarchar (1024): index creation Statement on the target table
@
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