Normal row-column conversion (version 1.0) only provides static and dynamic writing for SQL server 2000, and version 2.0 adds SQL server 2005 writing.
Question: Suppose there is a student orders table (tb) as follows:
Name course score
Zhang San
Click Manage/SQL server proxy/jobCreate a job:On the General tab, enter "name" in "regular backup database", "enable", select "check", and "target local server ","Category" select "database service ",On the "Steps" tab, create a step. Step name:
Run the following code in the SQL query analyzer.
Declare @ t varchar (255), @ c varchar (255)
Declare table_cursor cursor for select a. name, B. name
From sysobjects a, syscolumns B, policypes c
Where a. id = B. id and a. xtype = 'U' and c.
Recently, the company's business system must be synchronized with the overall business system version, for more than ten years, the company's business system has not synchronized with the latest version of the overall business system, the company
I. Basics
1. Description: Create a database
Create Database database-name
2. Description: delete a database.
Drop database dbname
3. Description: Back up SQL Server
--- Create a device for the backup data
Use master
Exec sp_addumpdevice 'disk',
-- Dynamically modify the next row of data in the same table using the changed data of the previous row (DEMO)
/**//*
Create Table account (
[Month] [datetime] not null prmary key,
[Planfare] [money] Null,
[Putoutfare] [money] Null,
[Planprefare]
Declare @ appliedindustryno varchar (20) -- Define a variable declare @ appliedindustryname varchar (20) -- Define a variable use ispdb -- reference database declare against cursor scroll -- Define to create a cursor variable for select * From
Declare @ SS varchar (300)
Declare @ CSR cursor
Set @ CSR = cursor
Select statpartno from catalog where flag = 2
Open @ CSR
Fetch next from @ CSR
-- Print @ fetch_status
While @ fetch_status = 0
Begin
Fetch next from @ CSR into @ SS
Print @ SS + '
Today in itpub saw a person ask the statement question: http://www.itpub.net/thread-1734957-1-1.html
The problem is as follows:
Table: EMPParent_id emp_id emp_name total_amoutNull 2 Andrew 2002 1. Nancy 1002 3. Janet 1203 4 Michael 801 5 Robert
-- Update 01/03 am --
I found that the Code is not surprising, but I just want to stir up the cold meal a few years ago. Because years have passed, some people may be negligent and try some others.
In the injection mode, numeric fields are the
If exists (select * From DBO. sysobjects where id = object_id (n' [DBO]. [sp_decrypt] ') and objectproperty (ID, n' isprocedure') = 1)
Drop procedure [DBO]. [sp_decrypt]
Go
/* -- Crack functions, processes, triggers, and views. Limited to sqlserver2
-- Update the owner of all tables in the database Exec Sp_msforeachtable ' Sp_changeobjectowner ''? '', ''Dbo'' ' -- Update the owner of all objects in the databaseCreateProcedureDBO. changeobjectowner@ OldownerAsNvarchar(128 ),-- Original
When we use
Code When I restore or delete a database, I often encounter a denial of operation due to a database connection. For this reason, I specifically wrote a stored procedure to clear all the database links of a database.
The Code is as
I. Basics
1. Description: Create a database
Create Database database-name
2. Description: delete a database.
Drop database dbname
3. Description: Back up SQL Server
--- Create a device for the backup data
Use master
Exec sp_addumpdevice 'disk',
Use scripts to view the size of each table in a database
-- Transferred from sqlservercentrual.com Declare @ ID int Declare @ type character (2) Declare @ pages Int Declare @ dbname sysname Declare @ dbsize Dec (
Today, the company's database is injected again ...... --(...... ¥ ...... -- * % ...... (* % ...... -- ¥ % ......
"The database is in use, so it cannot obtain the exclusive access to the database ".", If I forget how the restoration was solved when
--
Import all the Excel files in the folder to the SQL database. Each file is a separate table named by the file name.
--
By madgoat 2006-11-23
Create
Table
# T (fname
Varchar
(
260
), Depth
Int
, ISF
Bit
)
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.