1. query all tables in SQL:
Select TABLE_NAME FROM database name. INFORMATION_SCHEMA.TABLES Where TABLE_TYPE = 'base table' after execution, you can see the names of all tables created by yourself in the database.
2. query all tables and columns in SQL:
Select dbo. sysobjects. name as Table_name, dbo. syscolumns.
database server;4. The above is the backup and restore of the data, if it is to involve the database structure of the backup, such as table structure, stored procedures ..... Backup, there are two ways: a "Attach" MDF file, which of course will come with all the information, including data, but in the case of MDF, such as the database you want to copy is someone
different cases: SELECT .... When the WHERE clause of INTO does not match any data rows, the second method tries to reference PL/SQL index-by table elements that have not been assigned a value.
SQL % NOTFOUND: indicates the attribute for hiding the cursor. If no data can be retrieved, this attribute is TRUE. It is often used as a condition for loop exit of search.
If the WHERE clause of an UPDATE or DELETE
Tags: truncate. SQL Automatic color IMA interpretation system call imagesA Little StoryOne day, Xiao Wang is chatting with HR sister, is happy, suddenly received the system alarm message, the database disk is the remaining space 500m,omg, no, the disk is almost full, if the business to stop, then the small king can only delete the library to run,, First check, there are no files that can be deleted, the r
Access
The operation is very simple. The specific steps are as follows: Open your mdb database, tools> Database Utilities> compress and restore the database (c )...
SQL Server
In general, the contraction of the SQL database
Tags: jpg pytho width My little partner src tle senior DomesticWrite on behalf of SQL, database SQL generation, SQL write, database SQL programming GenerationMy partner and I graduated from top universities at home and abroad, wor
Tags: Database SQL Server 2008When using SQL Server to Do data mining, the user can not access the problem, so to the corresponding database add a login user Zhang, and give the appropriate permissions. When debugging, found that there is still a problem, so want to delete this user Zhang, and create a new user. An err
Label:Because of XX reason, SQL Server to downgrade, so with the following .... A script can be generated directly from SQL Server's own tools, as follows: 1. Open Microsoft SQL Server managenment Studio 2. Right-click the database >> tasks >> Generate script 3. Follow the prompts to proceed to the next step until you
Recently, after the computer reinstall System, SQL Server 2008 was installed. When attaching the database file, the discovery cannot be attached and the wrong version is indicated. Remember, the original database version isSQL Server 2008R2. Low-version database management toolsyou cannot attach directly to a higher ve
1. Query all tables in sql:
Select table_name from database name. Information_schema. Tables Where table_type= ' BASE table ' is executed, you can see the names of all the tables in the database that belong to you
2. Query all tables and columns in sql:Select Dbo.sysobjects.name as TABLE_NAME, dbo.syscolumns.name as column_name from Dbo.syscolumns INNER JOIN
The current solution is: Remove the other files on the hard disk, to empty the hard disk space, the database log file size to unrestricted, and then detach the database, to ensure that the separation is successful, and then delete the database log files (preferably renamed first, just in case). Attach the database agai
database parameterized ModeThere are two ways to parameterize a database, simple and mandatory (forced), and the default parameterization is "simple" by default.In simple mode, if the SQL is sent every time, unless it is exactly the same, it will be recompiled (special circumstances will be automatically parameterized, it is the focus of this article)The mandator
1. view the database version
Select @ version
2. view the operating system parameters of the machine where the database is locatedExec master .. xp_msver
3. view database startup parametersSp_configure
4. view the database startup timeSelect convert (varchar (30), login_time, 120) from Master .. sysprocesses where spi
1. The query statement is select * from t_table; The exported data format is as follows:2. Back up the data text, then open it using notepad++, then copy the data to the new TXT and replace it as follows:1) will "| "Delimiter (delimiter of different fields), replace with ', ' is the delimiter of the different fields in the SQL statement;2) Leave the leftmost "|" For each row of data "Replace with (') the left parenthesis of each record in the
AccessThe operation is very simple. The specific steps are as follows: Open your mdb database, tools> Database Utilities> compress and restore the database (c )...SQL SERVER In general, the contraction of the SQL database does not
Correctly install the SQL server database and SQL server database-IIS function requirements (warning)MessageIIS functional requirementsMicrosoft Internet Information Service (IIS) is not installed or disabled. Some SQL Server functions require IIS. If IIS is missing, some
, you can close all SQL windows and re-open them to restore the database. If an error is prompted, stop the SQL Service and restart it, as for the above other errors, you can change the content of the errors to restore them.
Iii. Database shrinking
In general, the contraction of the
1. query all tables in SQL:Select TABLE_NAME FROM database name. INFORMATION_SCHEMA.TABLES Where TABLE_TYPE = 'base table' after execution, you can see the names of all tables created by yourself in the database.2. query all tables and columns in SQL:Select dbo. sysobjects. name as Table_name, dbo. syscolumns. name AS Column_name FROM dbo. syscolumns inner join dbo. sysobjects ON dbo. syscolumns. id = dbo.
Follow the steps to avoid damaging your database if you do not follow the previous steps.
Generally do not recommend to do 4th, 62 steps, 4th step unsafe, it is possible to damage the database or loss of data. 6th step if the log reaches the upper limit, subsequent database processing will fail, and the log will not be restored until it is cleaned.
1. Empty log
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.