As a newbie, I downloaded several ASP. NET source code packages from 51aspx to study and learn. However, a small problem occurs, that is, some packages cannot be properly previewed, because some of them have DB access, while some source packages do
1. Table P is as follows:
Question: Calculate the product name and the difference quantity in red and blue in the table.
(1) first, it is divided into two temporary tables.
Use tempdbGoIf object_id ('# Table1', 'U') is not null // you can check
First, a complex method is provided to compress logs and database files as follows:
1. Clear logs Dump transaction database name with no_log 2. truncate transaction logs: Backup log database name with no_log 3. Compress database files (if not
In. net, the right-aligned string of the string. padleft function can be used to fill the string with the specified UNICODE character on the left to reach the specified total length.
For example, auto-number is used.
Int nextid = da. getmaxnum () + 1
The phenomenon is as follows: The inttype field is an integer.Select * from test where varchartype = 'test' and inttype =''Records with inttype 0 can be found.Update Test Set dcr_times = ''. The value of test is 0.
Differences between Oracle and
I believe that many people will be dizzy when they see these objects for the first time. Today I will lead you to combine these concepts.
· Login
Login is a server-level concept that indicates the credential for logging on to the server. For example,
SQL ServerGraph execution plan icon Learning (1)
1, Create a sample database (testdb ):
Use [Master]
Go
If exists (Select name from SYS. databases where name = n 'testdb ')
Drop database [testdb]
Create Database [testdb]
2Create a new table (
SQL Server SQL statement Import and ExportSQL statements of the soft SQL Server database are imported and exported, including data imported and exported from other databases and files./****** Export to excelExec master.. xp_mongoshell 'bcp settledb.
-- ===================================================== ====================-- List all SQL Server tables, field names, primary keys, types, lengths, decimal places, and other information-- Run the query analyzer to generate a table and export it
The system directory is a system table that describes the structure of objects such as databases, base tables, views, and indexes in the SQL server system. SQL Server frequently accesses the system directory to retrieve the necessary information
-- View table attributesSelect * From sysobjects where [name] = 'core'-- UsageIf exists (select * From sysobjects where [name] = 'region' and xtype = 'U ')Drop table Table1GoCreate Table1 ()
-- Get all user tablesSelect name from sysobjects where
1. If you want to query whether the connection is not released, you can use the query analyzer to connect to your database server and execute the following code:Select * from Master. DBO. sysprocessesWhere spid> 50And waittype = 0x0000And waittime =
When creating table, we often encounter such a statement, for example, password nvarchar (10) Collate chinese_prc_ci_as null. What does it mean? Take a look at the following:
First, collate is a clause that can be applied to database definitions or
I accidentally read an application that uses the for XML Path to retrieve multiple rows of Data separated by commas (,). I used for XML auto before. To find out the differences, I went to msdn for a tutorial.
Mark the learning result here. To learn
After setting SQL Server 2005 yesterday, the service cannot be started. Later, you can view the log:
2008-09-05 08:40:17. 82 server a self-generated certificate was successfully loaded for encryption.08:40:17. 82 server error: 17182, severity: 16,
The group by clause is used to group the result set and summarize and calculate each group of data.
Syntax format:
Group by [column name] [having condition expression]
Group by groups the columns specified by the "column name", groups the records
Newid ()
Randomly retrieve 10 records from Table A using
Select top 10 * From northwind. DBO. Orders
Order by newid ();
Or
Select top 10 *, newid () as random from northwind. DBO. Orders
Order by random;
In SSMs, we can see that their
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