ReferenceThird-party controls Add the aspnetpager. dll paging file to the bin directory.
Register on the reference page
Apply controls on the reference pageOnpagechanging = "aspnetpager1_pagechanging" pagesize = "15" width = "100%">
Query
Start:
In a project, no index is created for all the tables in the background database and columns with foreign key constraints. We need to create indexes for them at one time. Below I write a general Stored Procedure sp_createindexforfk to
Recently, when I was writing a stored procedure, I found a problem about introducing parameters to the string SQL statements in the stored procedure.
See the following example:
declare @count intselect @count=count(*) from student where Name in
Using DBI to connect to a Microsoft SQL server is a relatively simple task. Rather than go with a simple example, I have chosen to demonstrate not just connectivity, but also error checking.As always, when you want to use a module, you must declare
In addition, EXEC () can also break through this restriction, as mentioned in inside SQL server t-programming:
Concatenating VariablesIn SQL Server 2000, EXEC had an advantage over sp_executesql in terms of supporting longer input code. even though
I:GroupGrouping query results
ExploitationSQLOfGroupClause to quicklyIt is easy to divide the query result table according to the specified fieldGroup, records with the same value are divided into one group.GroupClauseSQLOfAggregate functionsIStart
Drop procedure propageset
Go
Create procedure propageset@ TB varchar (50), -- table name@ Col varchar (50), -- pagination by this column (it must be a unique character, such as the identification seed)@ Colorder varchar (50), -- the field to be
Null Value Judgment
$ T {type1id }=$ $ Pref {DBH}-> selectrow_array ("select type1id from enq1 where id =
3 ");
If ($ t {type1id} = 0 ){
Print "type1id is null \ n ";
}
==> This statement is incorrect if it is not a numerical value. Special
When writing SQL stored procedures, we often use print to print some information for debugging and debugging stored procedures.
However, once our application is deployed, we want to record the print information in the stored process to help us
Add SQL Server statements and stored procedures to favorites
-- ===================================================== ====================
-- List all SQL Server tables, field names, primary keys, types, lengths, decimal places, and other
Question:
Data is frequently queried in applications. When the data size of the query results is large, it takes a lot of time to retrieve the results and display the interface. To avoid this problem, only part of the data should be retrieved at a
How to Use metadatabase in Python
This article mainly introduces how to use metadatabase in Python. It is the basic knowledge in Python. The Code is based on Python 2.x. For more information, see
Type ()
The biggest difference between a dynamic
The basic statement of T-SQL, most people are very familiar with, today help house small Editor and everyone to share the SQL statement, T-SQL usage and syntax, as well as some examples, the purpose is to help everyone to review the basic statements
A simple cursor deletes an SQL SERVER table.
Use databaseNameDeclare @ tblname char (100)Declare @ SQL char (5000)Declare table_cursor cursor for select name from sysobjects where name like 'tb _ card [_] % 'and name <> 'tb _ card_regist' and name <>
Python for MySQL CRUD
Python is full of operations on various databases. However, I still like this style and it involves other operations, but it focuses on database operations.
Python for MySQL
First, I am used to writing configuration information
Start:
--------------------------------------------------------------------------------
On the network, we can see how SQL Server 2000 and SQL Server 2005 encrypt and decrypt stored procedures. Later, we analyzed the code and found that they work in
Cs page call code:
Copy codeThe Code is as follows: public int TotalPage = 0;
Public int PageCurrent = 1;
Public int PageSize = 25;
Public int RowsCount = 0;
String userid, username;
Public DataTable dt = new DataTable ();
Public string path,
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.