server| function
/**==** 1. The custom function was used for group by error **==**/--a simple function Create functions f_str (@str sysname,@i int) returns char (1) as Begin return (SUBSTRING (@ str,@i,1)) Endgo
--Here's the test
--Define test
When I started developing Web pages this interact with a SQL Server database, I probably started like everbody Else:with Inline SQL statements. I then progressed to using the connection object to call stored procedures and eventually using the
For example, data column name
Copy Code code as follows:
Name
A
B
C
D
The final result
Copy Code code as follows:
a*b*c*d*
Declare @test table (Namevarchar (10))Insert into @testvalues (' a '), ('
The following cross apply and outer apply keywords in SQL Server are presented as follows:
1.CROSS Apply and outer apply
The MSDN explanation is as follows (personal understanding is not very clear):
Use the APPLY operator to call a table-valued
In and exists these two functions are similar, but because the optimization scheme is different, the not exists is usually faster than not, because the not exists can use the binding algorithm two not in, and the exists is not as fast as in, Because
Recently there is a project that needs to check whether a character field value is a number, because the data row is massive, so need to pass through the SQL statement to screen, here to make a memo.
The function used is isnumeric, and the concrete
Copy Code code as follows:
--Create test table, insert data
CREATE TABLE Test (code varchar (), [values] varchar (a), [count] int)
INSERT Test SELECT ' 001 ', ' AA ', 1
UNION all SELECT ' 001 ', ' BB ', 2
UNION all SELECT ' 002 ', ' AAA ',
SQL Server random data Extraction efficiency optimization2013-05-11 1 Comments Vegetable Light Collection I want to contributeSQL Server random data Extraction efficiency optimization Hermit I recently encountered a very tangled matter, is how to
SQL Server learning and growth path, each technology learning process is worth to be memorable, and now Baidu on the sqlser on a lot of information, but are too miscellaneous, I hope to share a little easy to understand the dry, with everyone to
The following insights are diaries that are made during the process of using cursors. I am also the first time to use, if there is something wrong, please criticize, we work together.1. Msg 16951, Level 16, State 1, procedure Usp_proc, line 16thThe
Use theGoDECLARE @TableName varchar(255);CREATE TABLE#GetRecordingTempTable ([TableName] varchar(255) not NULL,[Mrs]date);DECLARETable_cursorCURSOR For --a table containing the column ' Sigdate 'SelectA.[name]Table name fromsysobjects A, (Select [ID]
--modifies the Functionno node value, @OperateFunctionNo the parameter set @DataXml. Modify (' Replace value of ' (/cruddata/functionno/text ()) [1] With Sql:variable ("@OperateFunctionNo") --delete node set @DataXml. Modify (' Delete
SQL Server transactions and locks, SQL Server
I. Overview
In terms of databases, for non-DBA programmers, transactions and locks are a major difficulty. In view of this difficulty, this article attempts to discuss with you through text and text.
The
Analysis of insufficient System tablespace alarms and analysis of system table alarms
The Code is as follows:
-- After logging on to an alert with insufficient SYSTEM tablespace, the SYSTEM finds that sys. aud $ occupies too many places. SQL> select
MSSQL 2000 Help (SQL server concise tutorial) and mssql concise tutorial
SQL SERVER 2000 installation Tutorial: http://www.bkjia.com/article/37380.htm
1. If your SQL space is activated, open your local SQLserver Enterprise Manager, for example:
2.
SQL server recursive subnode, parent node SQL query table structure instance, recursive SQL
1. query all sub-departments under the current Department
WITH dept AS (SELECT * FROM dbo. deptTab -- department table WHERE pid = @ id union all select d. *
We all know that using the aggregate function count () can calculate the number of rows in the table. To count the number of rows of each table in the database (DBA may have this requirement), use the count () function to generate a dynamic SQL
Q: How can I operate SQL Server 6.5 servers under SQL Enterprise Manager version 6.0?A: Before using SQL Enterprise Manager version 6.5 to operate SQL Server 6.0, you must first run it on the 6.0 Server.SQLOLE65. SQL. The file is in the MSSQLINSTALL
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