Batch Delete SQL Server objects (tables, stored procedures, triggers)

First, find the name of the table to be processed or the name of the stored procedure in the system table, and process it with a cursor. PS: sqlserver 2000 uses the system table sysobjects and the type field is xtype. The system table of SQL

SQL Server Performance

Index View the index of the Table: sp_helpindex [Table name] The essence of clustered index is a two-way linked list The essence of a non-clustered index is a balanced binary tree that uses multi-layer Classification to continuously narrow the

C # naming rules and SQL Server naming rules

Everyone knows that writing a program should have a good naming convention, which should be posted for convenience of work.1 ADO. Net naming rules Data Type Abbreviated Data Type Standard naming example Connection Con

SQL Server database performance optimization technology)

Source: http://www.newasp.net/tech/data/2430.html Abstract: factors that affect the performance of SQL Server databases and the principle of optimizing SQL server performance,Keywords: SQL Server database performance optimization QueryDesigning an

SQL Server Data Type

This article from: http://www.baanerp.com/post/48.html A data type is a type of data attribute, indicating the type of information represented by the data. Any computer language defines its own data type. Of course, different programming languages

SQL Server text field string replacement example processing script

--SQL Server text field string replacement example processing script /* -- Text field replacement--*/-- Create a data test environment-- Create Table # Tb (AA text)Declare @ s_str varchar (8000), @ d_str varchar (8000), -- Define the replacement

SQL Server database deadlock reduction techniques

If two user processes lock different resources and attempt to lock the resources locked by the other user, a deadlock will occur. At this time, SQL Server automatically selects and terminates one of the processes to remove the deadlock, so that

MDF file Restoration Technology in SQL Server database

Date:2006-07-19 Click:23 Author: Source:Webpage tutorial Network First, place the file to be restored in the data file in ms SQL. after entering the ms SQL master database server 1. We use the default method to create a database for recovery (such

Export SQL server data dictionary statements (favorites)

1. Export the table: Select top (1, 100) percentCase when a. colorder = 1 then D. Name else ''end as table name, case when a. colorder = 1 then isnull (F. Value ,'')Else ''end as table description, A. colorder as field serial number, A. Name as

Sp_executesql [some insights on the stored procedures of SQL Server]

Sp_executesql Execute statements or batch processing that can be reused multiple times or dynamically generated. Transact-SQL statements or batch processing can contain embedded parameters. [For details, refer to SQL Server online help] Here is a

SQL Server Functions

1. String Functions Length and Analysis Datalength (char_expr) returns the number of characters in the string, but does not contain spaces Substring (expression, start, length ). Right (char_expr, int_expr) returns int_expr characters to the right

SQL Server Update usage

Update is one of our common SQL statements. Update is mainly used to change the existing data in the table. Update a table: Update product set l_parentid = '1' Detailed Description: Update table name set column name = parameter Update two or more

SQL Server Stored Procedure Statement)

SQL ServerSyntax For ease of instruction, the database uses the example database of SQL Server, northwind and pubs. If SQL server does not exist, you can install it as follows: 1. Download sql2000sampledb. MSI, which

Distributed Query essays in SQL Server (sp_addmediaserver, sp_addmediasrvlogin)

due to the diversity of business logic, SQL Server often needs to query data in different databases, which leads to the need for distributed query. Now I will summarize several types of queries encountered in development as follows: 1. Access

A security problem caused by xp_expose shell in SQL Server.

Today, one of my colleagues demonstrated how to use the extended stored procedureXp_mongoshellTo activate the windowsGuestAccount and clear the password of that account, and then add the Guest account into the windows Administrators Group. after all

SQL Server rule usage

RulesA rule is a backward compatible feature that is used to execute functions that are the same as check constraints. Check constraints are the first standard method to limit column values. Check constraints are more concise than rules. A column

Naming rules in SQL Server (for personal use)

Table name prefix t Field name prefix F View name prefix v Use camel for variable naming Stored Procedure USP _ The stored procedure uses the Pascal naming convention. When multiple developers develop, add the module word prefix, for example,

Examples of common SQL Server Functions

-- String Function -- Substring Print substring ('iamagoodperson) Select substring ('iamoodperson) -- Upper Select upper ('he is a good person ') -- Lower Select lower ('this is an very interesting job ') -- Ltrim Select ltrim ('I am a good

SQL Server connection query between two servers

-- Query the connection between two servers: -- Establish a connection: Sp_addmediaserver HS Sp_addmediaserver HS1 Exec sp_add1_srvlogin 'hs ', 'false', 'sa', 'sa ', '123' Exec sp_add1_srvlogin 'hs1 ', 'false', 'sa', 'sa ', '123' -- HS and

SQL Server SELECT statement Optimization Method

Microsoft provides three main methods for optimizing queries:     Use set statistics Io to check the read and write operations generated by the query; Use set statistics time to check the query running time; Use set showplan to analyze the query

Total Pages: 923 1 .... 873 874 875 876 877 .... 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.