CopyCodeThe Code is as follows: repair table 'table _ name' to repair the table
Optimize table 'table _ name' optimize table
Repair table is used to repair damaged tables.Optimize
Copy codeThe Code is as follows:Repair table 'table _ name' REPAIR tableOptimize table 'table _ name' OPTIMIZE tableRepair table is used to REPAIR damaged tables.Optimize table is used to recycle idle database space. When the data
Copy Code code as follows:
REPAIR table ' table_name ' repair form
OPTIMIZE table ' table_name ' optimization tables
The REPAIR table is used to repair damaged tables.
The OPTIMIZE table is used to reclaim unused database space, and when data rows on a table are d
Code for implementing table fine-line table effects and table fine-line table code
Code for implementing the table thin-line table effect:Compared with the default table of the
Use [Database]GOSET ANSI_NULLS onGOSET QUOTED_IDENTIFIER ONGOCREATE proc [dbo]. [Table name]AsBeginDECLARE @Keyword varchar (max), @strs varchar (max)--Declaring cursorsDeclare mtf_cursor Cursor for select distinct Keyword from Keywords where flag=4--Open cursorOpen Mtf_cursorFETCH NEXT from Mtf_cursor to @Keyword-moves the cursor down by 1 rows to get the data into the previously defined variable @ @KeywordWhile @ @FETCH_STATUS = 0--Returns the state
Problem Description:Two Tables A and B, each with a field, update time A.MODIFIED_TM and B.modified_tm,a table as the main table, update time is not empty, but the B table update time may be empty, now to take a, B two table time the newest one, b.modified_ If the TM is empty, take A.modified_tm, for example:Table AID
For simpler tables, the amount of data is not a very much table, you can use a simple SQL statement to back up
CREATE TABLE t_fa_cat_20121207 as SELECT * from T_fa_cat
Create a new table and save the data
INSERT INTO T_fa_cat select * from t_fa_cat_20121207
To import the original backed-up data into a table to r
CREATE TRIGGER Tr_borrow on borrowAfter INSERTAsIF ((select I.bno from INSERTED I) in (select BNO from BOOKS WHERE bname= ' b002 '))BEGININSERT Borrow_saveSELECT * from INSERTED IPRINT ' has backed up this record 'ENDELSEBEGINPRINT ' did not back up this record 'ENDSQL Written question: Create a trigger on the borrow table to complete the following functions: If the reader borrows the title "b002", the reader's borrowing record is saved in the Borrow_
Query all table names: Select T.table_name from User_tables t; Query all field names: Select T.column_name from user_col_comments t; Query all field names for the specified table: Select T.column_name from user_col_comments t where T.table_name = ' biz_dict_xb '; Query all field names and field descriptions for the specified table: Select T.column_name, t.
MSSQLServer longitudinal table to transverse table transverse table to longitudinal table To create a table statement and insert a data statement: CREATE TABLEtest_y ([Name] [nchar](Ten)NULL, [Course] [nchar](Ten)NULL, [Grade] [int] NULL) Insert intoTest_yValues('Zhan
Tags: style blog http color io ar for strong SPSQL query table, all field names of the table2011-07-29 10:21:43|Category: SQL Server | Tags: table sql fields | Report | Font size Subscription SQL query table, all field names of the tableSQL SERVERView all table names:Select name from sysobjects where type= '
The original: "Bi thing-the art of data" understanding Dimension Data Warehouse-fact table, dimension table, aggregation tableFact tableIn a multidimensional data warehouse, a table that holds a detailed value or fact for a measure is called a fact table. A fact table that s
Fact tableIn a multidimensional data warehouse, a table that holds a detailed value or fact for a measure is called a fact table. A fact table that stores sales and sales by state, product, and month has 5 columns that are conceptually similar to the following example.
Sate
Product
Mouth
Units
Dollars
WA
Mounta
Tags: independent class filegroup Targe add value physics tell titleIf the data in one of the tables in your database meets the following criteria, you should consider creating a partitioned table. 1. There is a lot of data in a table in the database. What are many concepts? 10,000 lines? 20,000 lines? Or 100,000 or 1 million? This, I think is the question of the benevolent see and the beholder. Of course,
Tags: blog http io ar os using SP for strongpartition table in SQL Server 2005 (a): What is a partitioned table? Why use partitioned tables? How do I create a partitioned table? Category: SQL Server2009-12-03 10:17 15325 People read comments (+) Favorites report SQL Server Database 2010schemefunctionnullIf the data in one of the tables in your database meets
This article from the following aspects to collate the concept and operation of the partition table:1. Table space and the concept of partitioned tables2. The specific role of table partitioning3. Advantages and disadvantages of table partitioning4. Table partitioning of sev
CREATE TABLE as SELECT * FROM and insert to select from two table copy statement differences[SQL]View PlainCopy
Create table targer_table as select * from source_table
INSERT INTO target_table (column1,column2) select Column1,column2 from source_table
The above two sentences are to insert the record of the source
If the data in one of the tables in your database meets the following criteria, you should consider creating a partitioned table.1. There is a lot of data in a table in the database. What are many concepts? 10,000 lines? 20,000 lines? Or 100,000 or 1 million? This, I think is the question of the benevolent see and the beholder. Of course, when the data in the data table
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.