SQL SERVER2000 skills

1. query table name in SQL Server 2000 I often encounter situations where I forget the table name. I only remember the approximate one. At this time, I can query the system table Sysobjects to find the expected table name. For example, I want to

How to insert data from one table to another

The column names do not have to be the same. As long as you list the columns to be inserted in HH and the selected columns in the select from mm table one-to-one correspondence, of course, the Data Types on both sides should be compatible.Insert

Case study of SQL Server Memory being squeezed by operating system processes

Scenario: Recently, a DB Server occasionally experienced CPU alarms. My mail alarm threshold (please read y threshold) is set to 15%. It didn't take the case at the beginning. I thought it was a statistical query, later, it became more and more

SQL Server write a function to obtain the pinyin code of Chinese Characters

SQL Server write a function to obtain the Chinese pinyin code (first letter) Create function fun_getPY (@ str nvarchar (4000 )) Returns nvarchar (4000) As Begin Declare @ word nchar (1), @ PY nvarchar (4000) Set @ PY ='' While len (@ str)>

SQLite entry 3 Common commands

3. Data Display commands 3.1 set the separator:. separator Help:? 1 . Separator STRING Change separator used by output mode and. import   Example:The default Delimiter is |? 1 2 3 4 5 6 7 8 9 Sqlite> SELECT *

CTE statement structure and CTE recursive query in SQLSERVER

CTE statement structure and CTE recursive query in SQL SERVER CTE statement Structure A common table expression (CTE) can be considered as a temporary result set defined within the execution range of a single SELECT, INSERT, UPDATE, DELETE, or

Queries the space occupied by tables in the SQL database.

1. SQL statistics, which may be inaccurate after a large number of transaction operations Exec sp_spaceused 'table name' 2. Accurate tablespace size, but it may take some time for Statistics Exec sp_spaceused 'table name', true 3. database size

SQL server webpage Project Released

Problem description: At work, there will always be some such situations from time to time. The program running on development or QA is always good, but the program cannot run in the production environment. I was impressed by the two web projects

Use MyDBase to connect to SQL Server

Use the custom ADO. NET class MyDBase to connect to the SQL Server database Using System; Using System. Data; Using System. Data. SqlClient; Public class MyDBase { Bool ECode = false; String ES; SqlConnection cn = new System. Data. SqlClient.

Common SQL Server DBA maintenance statements

1. Check database integrityCopy codeThe Code is as follows: dbcc checkdb (test)-- Increase the speed by adding tablockDbcc checkdb (test) with tablock2. Rename the database, modify the recovery mode, and modify the user mode.Copy codeThe Code is as

Restore a database using SQL Server

Restore database Enterprise Manager -- Right-click "Database" -- All tasks -- Restore database -- Enter the restored database name in "Restore to Database" -- Restore select "from device" -- select device -- add your backup file -- OK, and return to

SQL Server case when usage Summary

First, create a table and insert a data statement: Use Student Go Create table Score ( Student ID nvarchar (10 ), Nvarchar (10 ), Score int ) Go Insert into Score values ('123', 'China', 87 ); Insert into Score values ('123', 'mat', 79 ); Insert

SQL Server obtains, adds, modifies, and deletes field descriptions.

Obtains, adds, modifies, and deletes sqlserver field descriptions. Select o. name AS tableName, c. name AS columnName, p. [value] AS Description FROM sysproperties p INNER JOIN Sysobjects o ON o. id = p. id INNER JOIN Syscolumns c ON p. id = c. id

SQL programming: Count the scores of n tests

Recently, I helped the school to set up a score entry system, which has the following task requirements: Requirement Description: There are three tables: 1. You can find all students corresponding to the course in the web_inputCj_cjb table based on

How to avoid deadlocks in SQL server

I. Four Conditions for deadlock 1. Mutual exclusion: resources cannot be shared and can only be used by one process. 2. Hold and wait: processes that have obtained resources can apply for new resources again. 3. No pre-emption: allocated resources

Several Opinions on databases and SQL Server

(1 ). With the advent of the big data era, data plays an increasingly important role in our lives, and our dependence on data is growing. Therefore, it is a very important technology to learn and master database knowledge and design and develop

Some classic code in SQL database development

1. sort by strokes of the Last Name: Select * From TableName Order By CustomerName Collate Chinese_PRC_Stroke_ci_as 2. database encryption: Select encrypt ('original password ') Select pwdencrypt ('original password ') Select pwdcompare ('original

SQL string processing function Summary

In a select statement, only SQL functions can be used to operate fields (link to SQL server ), Select Field 1 from table 1 where field 1. IndexOf ("Cloud") = 1; This statement is incorrect because the indexof () function is not an SQL function. You

Sqlserver query tables in which a field exists

-- All tables containing the hospital ID field Select a. [name] from sysobjects, ( Select [id], count (*) B from syscolumns Where [name] = 'column1' Group by [id] ) B where a. [id] = B. [id] order by a. name asc -- All tables that contain

Change SQL server database from single-user mode to multi-user mode

Today, I want to copy a database under SQL server2005. The result is an error in the last step. If the replication fails, the database cannot be opened, The "single user" is displayed after the name. It is estimated that it is automatically changed

Total Pages: 923 1 .... 916 917 918 919 920 .... 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.