There are many choices in development tools, database design, application structure, query design, interface selection, and so on, depending on the specific application requirements and the skills of the development team. This article takes SQL
First, simple query
A simple Transact-SQL query includes only a picklist, a FROM clause, and a WHERE clause. They describe the query column, the query's
Tables or views, and search criteria, and so on. For example, the following statement queries
There is often a large amount of data in your project that is saved to the database, such as saving it with just one table. The preferred solution is to create dynamic tables by date to hold the data. With a dynamic stored procedure as the preferred
SQL2000 database because of its own vulnerabilities, hackers can easily access the system administrator permissions.
SQL runs with system privileges by default, and permissions are super powerful.
In order to make the server more secure, it is
1. Data and log files are stored separately on different disks
The operation of data files and log files produces a large amount of I/O. Where possible, the log file should be stored on a hard disk that is different from the data file where the
That is, as a visitor to the site to log in as a cookie to store the shopping cart, and the identity of the logged-in user to enter the shopping cart information stored in the database, if the first to complete the shopping as tourists and then
Programme summary:
1. Change file name when storing
2. Configure the indexing server and associate the Index server with MS SQL Server.
3. Modify the SQL statement to include the contents of the Full-text query statement in the query criteria
How
Auto COMMIT Transaction
The default Management Studio is autocommit transactions, that is, a statement on a transaction.
An implicit transaction
Open SQL Server managerment Studio and log into the instance.
Tools-> Options
Query Execution->
How to delete a database log file
You used to have it. When executing SQL, the database reports that the transaction log is full and then executes the error. Then tangled in how to delete the database log, for half a day, now provide two kinds of
Download Pdo_dblib Library
PDO's various libraries can be found in pecl, for example, MYSQL Library: Pdo_mysql, Oracle Library: Pdo_oci.
As a connection library for SQL Server, download pdo_dblib with the following command:
Copy Code code
Copy Code code as follows:
--The ranks turn
/************************************************************************************************************** ****************************************
Take the student achievement as the example,
1. system table sysobjects
Each object created in the database (such as constraints, defaults, logs, rules, and stored procedures) corresponds to one row.
Column Name
Data Type
Description
Name
sysname
1. Start SQL Server Management Studio and log on as a Windows authentication method.
2. In the Object Explorer window, right-click the server, select Properties, and open the Server Properties dialog box.
3. On the Security page, under Server
Copy Code code as follows:
Set ANSI_NULLS on
SET QUOTED_IDENTIFIER ON
Go
Create PROCEDURE [dbo]. [Sp_pagination]
/**//*
***************************************************************
* * Tens of millions of levels of paging stored
Recently looked for a lot of replacement to be inserted in the Trojan record, found a good statement, very useful, just use more than 10 lines of travel slogan, the entire database of all the table malicious Trojan cleared away, and in Google search
The creation of stored procedures prior to 2005 was done in a Transact-SQL language in the database, but now that SQL Server 2005 supports writing CLR stored procedures in other object-oriented languages, there are many official explanations for the
Recently due to the need for work, a simple understanding of the next SQL Server 2005 database creation is simple in stored procedures.First, explain how to create a stored procedure:CREATE proceduer my_pro @inputDate varchar,DECLARE input variable @
1. Statement block (BEGIN ...) End)The syntax for the statement block is as follows:BEGINEndBEGIN ... End is used to set a statement block, you can encapsulate a number of Transact-SQL statements to form a block of statements, when processing, the
The first scenario, the simplest, the common method:
Copy Code code as follows:
Select Top * from ARTICLE WHERE ID. (select top 45000 ID to ARTICLE order by year DESC, id DESC) Esc,id DESC
Average Enquiry 100 Time: 45s
The
For fields with generic string types in your program, there are four types of char, varchar, nchar, and nvarchar in SQL Server, so what's the difference between these four types?
1. Fixed-length or variable-length
The so-called fixed-length is
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.