File:. wmv; Size: 19,535kb; Length: 00:26:39.
Download Address: Sqlfunction_udf_week.rar
The following is updated on 20120105:
2012 just arrived, the software developed uses this function to discover bugs. The first week of 2012 should be 2012-01-01
First, the preface
See a document about SQL Server table partitioning on MSDN: Special guidelines for partitioned indexes, it's harder to understand the meaning of a document if you don't have actual experience with the table partition. Here I will
By using user-defined table types in MSSQL, you can quickly store the data that needs to be processed, generate a new temporary table (where the variable table is used), and replace the cursor with a batch of fields in the table.User-defined table
Application Scenarios:1, in the data table, to record when each piece of data was created, do not need the application to deliberately record, and the data database to obtain the current time automatically record creation time;2, in the database, to
One, create a syslog database
mysql> CREATE DATABASE Syslog character set UTF8;
mysql> use Syslog; Mysql> CREATE TABLE systemevents (ID int unsigned NOT NULL auto_increment primary key, Cus Tomerid bigint, Receivedat datetime null,
Implementation method:1. Set the field type to TIMESTAMP2. Set the default value to current_timestampExamples of applications:1. MySQL Script Implementation use case-- add Createtime Set default time current_timestampALTER TABLE ' table_name 'ADD
Way One:ALTER Proc [dbo].[Usp_rpt_accttypeaudit]@FromDate datetime=NULL,--Yyyy-mm-dd ( may change in the future!)@ToDate datetime=NULL,--Yyyy-mm-dd ( may change in the future!)@UserID nvarchar( -)= ' All' asBEGIN
The main content of this article comes from discussions with others.When developing or designing a software system, it is easy to encounter concurrency situations. Sometimes it needs to be deliberately avoided to prevent data errors. For example,
In Microsoft SQL Server , you can implement to pass a table variable into a stored procedure, and if the variable can be declared, it can be passed. Let's describe how to pass the table variables ( including the included data ) to the stored
DB Design in project development0. Analyze the origin of data and the relationship between data based on prototype (entity relationship);1. Extract the field, through the PowerDesigner design table;2. First, the first one-way correlation on the data
1. Temporary tables are suitable for large data volumes, because temporary tables can be indexed2. Table variables are suitable for cases where the data is small, and table variables can only create constraints (PRIMARY Key/unique) when defined to
Tool Class Public classMongodbdao {/*** Get MongoDB Client instance * *@return * @throwsException*/ Public StaticMongoclient getmongoclient ()throwsException {Try { //decryption with secret keyString SKey =
Before we proceed with this article, we may need to add some basic knowledge.First of all, our system is based on interface programming, why should we use an excuse to program, in fact, this is the application of an Enterprise Application
ALTER procedure P_date@year int=2005,--year@week int=33,--weeks@firstday datetime =null output, the first day of the week@endday datetime =null Output-The last day of the week asdeclare @currentWeek int, @currentFirstday datetimeSelect @currentWeek =
Killergo's Column
Recently, because of a bit of free time, I thought about how to use the paging of stored procedures on the SQL Server platform, now listed below.
In the actual test, the performance of the two is roughly equal in the case of 15,000
Then on a blog to write, remember: Database curriculum design (i);
First, the previous database structure and field types were fine-tuned:
Here's a look at the entire development framework and the basic steps I've envisioned:
Development framework:
[Abstract] Quality department proposed rosh information management needs: input incoming inspection single time, take the system exterior product number supplier material corresponding * * Test date, effective date, warning date * *.
Solution:
1.
Recently done a small project complete database design, want to sum up some of the design of the income, I hope we have a lot of advice.
Sometimes a project, ordinary programmers usually do not contact the database design, generally have a
The query hint has always been a controversial thing because he has influenced SQL Server to choose its own execution plan. Many people ask whether they should use the query prompt or not to use it carefully or not. However, individuals think that
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.