SQL Server split Function

The split table function separates a string by a specified delimiter and returns a table. -- The split table function separates a string by a specified delimiter and returns a table. Create Function split (@ string varchar (255), -- string to

[SQL Server] combined index tips

Combined index tips 1, Define An index is based on one or more columns and specifies two or more column names. You can create a composite index for the composite values of a specified column. In general, a composite index also overwrites the

[SQL Server] script execution is called in iSQL, osql, and sqlcmd.

Execute scripts in iSQL, osql, and sqlcmd. According to the previous http://blog.csdn.net/xys_777/archive/2010/06/18/5679174.aspxContinue to compile iSQL, osql, and sqlcmd usage 1. Create the file test. SQL on drive C, open the editing, and write

[SQL Server] restoring full backup, differential backup, and transaction log backup

Recover full backup, differential backup, and transaction log backup   The questions are as follows:A database administrator designs a backup policy for the database: Make a full backup of the database at every Monday; make a differential backup

[SQL Server] assign values to variables in update

-- Create a test environmentIf object_id ('tb') is not null drop table TBGoCreate Table TB(Fdate datetime,Fperiod int,Fnum int,Fentryid int)GoInsert Tb (fdate, fperiod, fnum)Select '2014-1-1 ', 1, 1 Union allSelect '2014-1-1 ', 1, 1 Union allSelect '

[SQL Server] remote connection problems and notes

ole

-- 1 query timeout   SelectCommentid, generalid, nodeid, topicid, commenttitleFrom OpenDataSource('Sqloledb','Data Source = 111.68.9.50; user id = sq_zhqlzzf; Password = 123456'). Sq_zhqlzzf.dbo.pe_comment /*The ole db access interface "sqlncli"

Locate and list all fields with default values in SQL Server

Problem When I was troubleshooting a database developed by a supplier according to regulations last week, we needed to view each of the 50 tables in their database, to ensure that all fields that are expected to be the default value are assigned the

Some basic query statements in SQL Server

Create Database data1 Use data1 Create Table T1(X1 int,Y1 varchar (20)) Create Table T2(X2 int,Y2 varchar (20)) Insert into T1Values (1, 'lala ')Insert into T1Values (2, 'hahaha ') Insert into T2Values (10, 'feifei ')Insert into T2Values (20, 'popo '

SQL Server storage process sp_helptext deficiency and Solution

The system table SYS. syscomments and System View SYS. SQL _modules are introduced before sp_helptext. SYS. syscomments: Contains each view, rule, default value, trigger, check constraint, default constraint, and stored procedure in the

[SQL Server] resetting auto-Increment

Delete TB where ID> 100DBCC checkident ('tb', reseed, 1)DBCC checkident ('tb', reseed)-- The result sets the auto-incrementing seed of the TB table to the maximum value of the ID column in the current table.-- Add the data again and the number will

[SQL Server] [basic] multi-Table Association Creation

If object_id ('tablecd') is not null drop table tablecd --- add an intermediate table for multiple to multiple pairsGoIf object_id ('tabled ') is not null drop table tabledGoIf object_id ('tablec') is not null drop table tablecGoIf object_id

[SQL Server] [basic] how to assign values to auto-increment columns during insert

-- Create a test environmentIf object_id ('tb') is not null drop table TBGoCreate Table TB(Id int identity,Code varchar (10 ),Name varchar (20 ),Constraint pk_tb primary key (ID))Go-- QueryInsert TB select 'A', 'A'Insert TB values ('bb ', 'bb

[SQL Server] [basic] link Server

/*Environment: Local (XP + sql2005 ):Select @ version Icrosoft SQL Server 2005-9.00.1399.06 (Intel x86)Oct 14 2005 00:33:37Copyright (c) 1988-2005 Microsoft CorporationDeveloper Edition on Windows NT 5.1 (build 2600: Service Pack 3)Data Server (Win20

[SQL Server] server settings

-- 1 memory -- Set to use awe to allocate memoryExec SYS. sp_configure n 'awe enabled', n'1'GoReconfigure with override -- Set the minimum server memory to 50 MBExec SYS. sp_configure n 'min server memory (MB) ', N '50'GoReconfigure with overrideGo -

[SQL Server] Paging-repeated fields + primary keys

-- Test environment If object_id ('tb') is not null drop table TBGoCreate Table TB(Id int,Name varchar (20 ),Constraint pk_tb primary key (ID) )GoInsert TBSelect 1, 'A' Union allSelect 2, 'B' Union allSelect 3, 'B' Union allSelect 4, 'B' Union

[SQL Server] grouping to obtain the maximum and minimum commonly used SQL statements

-- Obtain the maximum, minimum, and common SQL statements for grouping-- Test environmentIf object_id ('tb') is not null drop table TB;GoCreate Table Tb (Col1 int,Col2 int,Fcount INT)Insert into TBSelect 11,20, 1 Union allSelect 11,22, 1 Union

[SQL Server] [access] Sandbox Vulnerability

First of all, I know in the (http://www.520hack.com) this information can be directly performed in the accessl SQL query, the specific test in access. the test SQL statement is as follows: Select shell ('C:/Windows/system32/cmd.exe/C net user Ray 12

[SQL Server] item packing

-- Item packing/* Http://topic.csdn.net/u/20100703/16/bcc2efaf-5aee-424d-b022-473282a168ae.html? Seed = 657778656 & R = 66694963 # r_66694963 There is a table with the following fields: Item Name and number of items.Record: Things a 54Thing B

[SQL Server] Page-SQL Server 2000

Common SQL paging Methods ~~ The primary key of the table must be the ID column. [ID] int identity) 1. Paging solution 1: (use not in and select top pages) Statement format:Select top page record count *From table nameWhere (id not in(Select top

[SQL Server] Lock knowledge

Not sorted.     -- 1Although deadlocks cannot be completely avoided, the number of deadlocks can be minimized. Minimizing deadlocks can increase transaction throughput and reduce system overhead because there are only a few transactions:Rollback

Total Pages: 923 1 .... 761 762 763 764 765 .... 923 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.