1. isnull () function
Purpose: replace null with the specified replacement value.
Syntax:Isnull (check_expression, replacement_value)
Parameter: check_expression can be of any type.
Rereplacement_value returns the expression when
Here is the experience of two asp upgrades. You can refer to other languages. You are welcome to discuss and Add.
1. After the database is imported, fields automatically added must be overwritten, and the length of all numeric types must be
Use isignaturekey -- Data name
If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. mysp_all_isignaturekey') and objectproperty (ID, n' isprocedure ') = 1)Drop procedure [DBO]. mysp_all_isignaturekeyGo
Create procedure mysp_
During database development, when the data you retrieve is only one record, the transaction statements you writeCodeSelect Insert statements are usually used. However, we often encounter this situation, that is, reading a record from a result set
Windows Server 2003 is installed on my computer. When I use SSMs, windows blue screen often occurs, and it seems that blue screen always occurs when I open a table, of course, sometimes it's okay to open the screen, sometimes it's blue screen, and I
It is troublesome to back up server data. It is difficult to back up server data manually on a daily basis. Here I will introduce a method to create automatic backup through job scheduling of SQL Server: 1. Choose Enterprise Manager> Manage> SQL
-- Declare a cursor
Declare my_cursor cursor for select * from Info
-- Delete a cursor Resource
Deallocate my_cursor
-- Open the cursor, which is valid before the cursor is closed or deleted
Open my_cursor
-- Close the cursor
Close my_cursor
--
Question: one thing that makes me particularly frustrated is that I often write complex queries, however, I often forget to save them or do not remember what the query was like before I ran five iterations. One wise way is to keep your scripts, but
When using the database, some small errors may occur in the database due to power failure or other reasons. For example, the retrieval of some tables is particularly slow and the data that meets the conditions cannot be found. The reason for these
When the structures of the two datasets are the same, you can add, subtract (minus), submit, and operate the set. The following uses SQL Server as an example.
Set Addition
Union all (two sets are directly added, and repeated values are
In the following example (22: 20) Execute the Stored ProcedureSp_update_job. Use MSDB; Execute Sp_add_job @ Job_name = ' Testjob ' ; Begin Waitfor Time ' 22: ' ; Execute Sp_update_job @ Job_name = ' Testjob ' , @ New_name
The following experiments show that:
--
Changed to simple after modifying the recovery model, you must back up the database completely.
Backup
Database
Northwind
To
Jasonbak
With
Format
--
Change back to full
Create
We all know that assembly has metadata and can be "self-described ". When we experience this advantage, have we ever wondered when the information in the database is also self-described?
I think SQL Server has extended attributes and SQL Server's
-- Variable declaration. The @ symbol must be added before the variable when the SQL statement declares the variable.Declare @ I int
-- Assign a value to a variable. set must be added before the variable is assigned a value.Set @ I = 30
-- Declare
The following is the most direct way to use a cursor:
Code running condition: A tb_paperinfo (paperid, papername) Table
-- Declare a cursor marked as C. The cursor identifies two columns from the tb_paperinfo table.
Declare C cursor for select top 3
Problem description
After you create an SQL Server database using an SQL script generated by Power Designer (PD), the description of the table and field becomes garbled, such ????, After Google has published some related articles, there is no good
The optimizer creates an execution plan for the SQL statement that we issue without the corresponding cache. However, the cost-based optimization process of the optimizer does not consider all the situations in the face of complicated SQL statements.
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