To do a project, the first thing to ask is:"How big is this database?" "Here's how to count the data size of the databaseUsually we will use the command: "sp_helpdb @dbname"For example, querying the usage of the database "TESTDB3"EXEC sp_helpdb
SQL Server 20081. SQL Server settings self-increment columnCREATE TABLE ex(sno int identity NOT NULL,Sname char (+) NULL)Starting from 0 default self-increment +1To set the initial value identity (m,n)M is the starting position, N is the increment2.
I. ConstraintsData integrity: Correct, consistent data.Designer: Before data table creationTo achieve data integrity:1. Entity integrity: (row unique does not repeat)Role: Ensure that rows are unique and not duplicatedTechnical means: PRIMARY KEY
--if ElseIf 1>0print ' big '--begin End StructureBegin end use to set a block for batch processingIf 1>0Beginprint ' big 'EndThe--case statement has a return valuedeclare @a int, @b char (10)Set @a=1Set @b=caseWhen @a>0Then ' greater than 0 'When
Before sqlserver2005, it is cumbersome to implement recursion, for example, you might want to use a temporary table with a while statement to loop. Since sqlserver2005, the new with AS function syntax, the common expression (CTE), makes recursive
1.CHARINDEX (' A ', ' VALUE ') result:2 Style:patindex (Varchar,varchar)Explanation: A in the position order of the string value.2.PATINDEX ('%a% ', ' VALUE ') result:2 style:patindex ('%xx% ', varchar)Explanation: A in the position order of the
1, open the address, we can see is a normal page.2., and then add-1 after the address, to: http://site/news.asp?id=123-1, if the returned page is different from the front, is another normal page, it indicates an injection vulnerability, and is a
Declare @Id varchar( -)--Define two local variables @id @name global variable is two @ @nameDeclare @Name varchar( -) DeclareCurCursor for--Define a cursorSelectId,name fromTEMP1--query statement return ID and nameOpenCur--Open cursorFetch Next
If you select Windows Authentication mode during the installation process, the SA login is disabled. If you later change the authentication mode to SQL Server and Windows authentication mode, the sa login is still disabled.To enable the sa login,
--The field description of the query table--use dataname-----Database nameSELECT T.[name] As table name, C.[name] As field name, cast (ep.[ ValueAs varchar () as [field description]From Sys.tables as TINNER JOIN sys.columnsAs C on t.object_id =
1 Insert into Table(Field1,field2,...)Values(Value1,value2,...)--inserting A single piece of data2 3 Insert into Table(Field1,field2,...)SelectValue1,value2,...Union SelectValue1,value2,...--Insert multiple data, do not allow default4 5 Insert
1. If you modify the installation path after installing the errorFor example, to modify "C:\Program Files\Microsoft SQL server" to "D:\Program Files\Microsoft SQL Server "The error details are: "The Instancesharedwowdir command line value is not
Tutorial on installing SQL Server in Ubuntu, ubuntusql
Microsoft just announced a Public Preview of the next generation of SQL Server, and Canonical officially announced that this preview version can be used in Ubuntu. Whether deployed internally or
Brief Introduction to SQL Server statement categories database paradigm System database composition, SQL paradigm
Preface
Finally, on this day, I will start to study the database again. If there is no accident about the database, I will update a new
Detailed steps for installing SQL Server after installing VS2015, vs2015server2014
It has always been said on the Internet that installing SQL Server 2014 and VS2015 will not cause any problems. I have installed VS2015 without any preparation. After
When SQL Server attaches a database, the following error occurs: The physical file cannot be opened. If the operating system is incorrect, a graphic tutorial is provided.
Problem description:
When attaching data, the system prompts that the
How to quickly delete the options in the drop-down list box for the logon name of SQL Server
Problem:
I previously created a login name, such as kpi, and deleted it in "security-Logon Name". However, the logon name kpi is always displayed in the
Usage of STUFF and SQLSTUFF in SQL
1. Role
Delete characters of the specified length and insert a group of characters at the specified start point.
2. Syntax
STUFF ( character_expression , start , length ,character_expression )
3. Example
The
CentOS installation of SQL Server vNext CTP1 tutorial, centosctp1
Today, Microsoft officially released SQL Server 2016 SP1, which can be used in the production environment according to the previous SP1 law. The Standard Edition with SP1 will have
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.