Regardless of your professional level, IT is often helpful to learn new skills and best practices from other IT experts. This article contains the advanced SQL Server development skills I have encountered. I hope some of these skills will be helpful
SQL Server database log backup and recovery steps
SQL Server database log backup and recovery steps
-- Create a Test DatabaseCreate database Db
GO
-- Back up the database
Backup database Db to disk = 'C: \ db. Bak' WITH FORMAT
GO
-- Create a
Database inspection this morning, found the alert Log in the following error: Warning: ORA-00600: Internal error code, parameters: [kqlnrc_1], [0x15E465678], [], [], [], [], [], [] MonJun1810: 11: 31CST2012Er
This morning, I performed database
The view stores metadata, columns, security, dependencies, and other information. If we change the architecture of the basic table, it is not directly reflected in the view. After the architecture is changed, it is a good habit to use sp_refreshview
DECODE function: Compares the input value with the parameter list in the function and returns a corresponding value based on the input value. The parameter list of a function is a sequence of several numbers and their corresponding result values. Of
An article library contains two tables: category and article. There are 10 classified data entries in category. There are 0.2 million articles in articles. There is an article_category field in article that corresponds to the category_id field in
Because only the mdf file is available and you want to restore the database, you can use the following code to test it first.
Because only the mdf file is available and you want to restore the database, you can use the following code to test it
If you need to manage sqlserver, you can add them to your favorites for future use.
If you need to manage SQL server, you can add it to your favorites for future use.
1. view the database version
Select @ version
2. view the operating system
Considerations for importing data to tables with auto-increment Fields
Considerations for importing data to tables with auto-increment Fields
Notes for importing data to tables with auto-increment fields:1. Set the auto-increment field to
1. Related content: In SQLServer2000, if the database sorting rule is Chinese_PRC_CI_AS, the query results are case-insensitive. For example, the following two SQL statements have the same query results.
1. related content: in SQL Server 2000, if
"The latest X of every Y" is a classic SQL problem that is frequently encountered at work. Of course, it is not as simple as "querying the latest X value by Y Group". It requires the record or primary key ID of the latest X. You can use an SQL
How to use SQL statements to randomly query data without displaying Error Data
How to use SQL statements to randomly query data without displaying Error Data
Problem: the upper-level organization wants to check the data. The database on my server
SQLServerSQLAgent service usage tutorial Summary
SQL Server SQL Agent service usage tutorial Summary
1. start or stop the SQL Agent service in the query analyzer.
Start
Use master
Go
Xp_cmdshell 'net start sqlserveragent'
Stop
Use
Full use of very detailed SQL--JOIN
Full use of very detailed SQL--JOIN
Outer Join. Outer Join can be left Outer Join, right outer join, or complete external join.
When an external join is specified in the FROM clause, it can be specified by one of
Using the GUID value as the database row identifier
Using the GUID value as the database row identifier
GUID (Global unique identifier) is a globally unique identifier, which consists of the ID numbers on the NIC (each Nic has a unique ID number)
Batch replacement of strings in SQLSERVER
How to replace strings in batches in SQL SERVER
Method 1: (this is the most commonly used, because many of the content in a large segment uses data types such as text ntext, and we usually Replace the
In microsofregulatory; SQLServer #8482;, each column, local variable, expression, and parameter has a related data type, this feature specifies the data types (integer, character, money, etc.) that an object can hold.
In microsofregulatory; SQL
SQL language query basics: Connection query joint query code
SQL language query basics: Connection query joint query code
SQL language query basics: Connection Query
You can use the join operator to query multiple tables. Connection is the main
Select command for instance learning SQL
Select command for instance learning SQL
-1. Find the employee ID, name, department, and date of birth. If the date of birth is null,
-- Display date is unknown and output by department. The date format is
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