The first letter of each Chinese character field obtained in MySQLThis is reproduced in http://blog.csdn.net/lky5387/article/details/11973721DELIMITER;;CREATE FUNCTION ' getpy ' (in_string VARCHAR (65534)) RETURNS mediumtext CHARSET UTF8BEGINDECLARE
1. General CommissioningClick the Debug button on the SSMs client directly to2. Stored Procedure Debugging2.1 Defining stored procedures (for example, the Northwind database)Use [Northwind]go/** * * * object:storedprocedure [dbo]. [Sp_getorders]
SQL Server 2005 and SQL Server 2008 are used when the database is already built in db. Bak file restore, error occurs: "The backup set holds a backup of a database other than the existing" check the online method:method one [not verified][SQL] View
After writing the last article, there are friends to give out other ideas, I in the summary in this blog.Idea one: Convert the output to a string (this is also the idea given in the previous article)1 1 SELECT Case when @a % @b = 0 Then
The company has an old project because directly to the terminal shot pictures in the form of binary saved to the database, the database is larger so need to often delete these redundant data, manual removal time and effort, project leader let me
--enable or disable all foreign KEY constraints on the specified tableAlter TableTbnameNOCHECK constraint All Alter TableTbnameCHECK constraint All--View ConstraintsSelectName, is_disabled fromSys.foreign_keysOrder byname--DisabledALTER
--when inserting data into the table "j0261", check that the number exists in the table "j026", insert if present, otherwise it will not be inserted. Create trigger Checkid on J0261instead of Insertasif (no exists (Slect * from j026 where study
--------------------------------------------------------------This paragraph first executesexec sp_configure ' show advanced options ', 1Reconfigureexec sp_configure ' Ad Hoc distributed Queries ', 1Reconfigure----------------------------------------
Method 1:Insert into A.dbo.users (FIELD1,FIELD2,FIELD3) SELECT * FROM B.dbo.usersNote: The same server, A and B are different databases, such as the table is automatically marked, you can first cancel the automatic indicator, and then execute.Method
Original: MS SQL Server with time records how to queryFor example, a table [a] has a save date containing the Time field [b], if the paragraph [b] as the query criteria to query data records. And we have to spend some time trying to find the records
A. Shared diskShared disks may be used in cluster technology. This type of disk can be accessed concurrently by multiple nodes, but only the primary node has access to the shared disk at any one time.Second, use the shared disk scene1. Quorum
(Transferred from: http://www.cnblogs.com/xugang/archive/2011/01/20/1939960.html)Tools:Sybase PowerDesigner 12.5Microsoft SQL Server 2005First step: Conceptual data ModelOpen the PowerDesigner software and design the " Conceptual data Model "
I encountered an interview question recently, and I was confused. I only spoke about my thoughts. Later, Baidu sorted out my thoughts and recorded them to facilitate future study. (For the interview questions, see the attachment)Related Data Tables:1
My device inserts 2000 data records into the database every second, and 2 devices have a total of 4000 records. When the insert statement is directly used in the program, about 2800 pieces of data can be inserted at the same time between the two
Sqlserver implement paging using window functions
Alter proc [dbo]. [usp_GetStuPage]
@ PageIndex INT = 1, -- current page number
@ PageSize INT = 10, -- page size
@ PageCount int OUTPUT -- total number of OUTPUT pages
AS
BEGIN
SELECT @
Use SQL statements to delete duplicate items and retain only one
There are some identical records in thousands of records. How can I use SQL statements to delete duplicates?
1. Search for redundant duplicate records in the Table. duplicate records
Author: FLASHSKYSITE: WWW. XFOCUS. NETMail: flashsky@xfocus.org
In SQL SERVER 2000 communication, a famous pipeline is allowed for communication, which is generally named as follows:Default instance: \. \ pipe \ SQL \ queryNamed instance: \. \ pipe \
The following describes the code used in SQL to determine whether a variety of resources exist. For more information, see SQL functions and databases.
-- Whether the database exists if exists (select * from master .. sysdatabases where name = n'
X first find the constraint name
Then delete it.
Here is an example.
-- Test environment
-- Master table
Create table test1 (id int primary key not null, value int)
Insert test1 select 1, 2
Go
-- Slave table
Create table test2 (id int
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.