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. sysobjects. id Where (dbo. sysobjects. xtype = 'U') AND (NOT (dbo. sysobjects. name LIKE '
Topic: Consumers from Madrid with fewer than 3 orders
Build table:
Copy Code code as follows:
SET NOCOUNT ON--When SET NOCOUNT is on, the count is not returned (representing the number of rows affected by Transact-SQL statements). Returns the count when SET NOCOUNT is off
Use SY
Go
If OBJECT_ID (' dbo. Orders ') is not null
DROP TABLE dbo. Orders
Go
If OBJECT_ID (' dbo. Customers ') is not null
DROP TABLE dbo. Customers
Go
CREATE
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 mandatory mode is to force the Adhoc SQL to be parame
After a DML statement is executed, the results of the DML statement are stored in four cursor attributes, which are used to controlProgramProcess or understand the program status. When running a DML statement, PL/SQL opens a built-in cursor and processes the result. The cursor is an area in the memory that maintains the query result. The cursor is opened when running the DML statement and closed after completion. Only
About T-SQL and SQL Enterprise Manager, SQL Enterprise
After reading the database video, we often use two methods in the video. One is the SQL Enterprise Manager, and the other is the T-SQL (Tansact-SQL ). For the first method, it
Label:The optimization of SQL statements is to convert poorly performing SQL statements into the same performance SQL statements with the same purpose.AI automatic SQL optimization uses AI technology to automatically rewrite SQL statements to find the best-performing equival
server | sqlserver | data | data type | conversion Why not let SQL Server automatically convert the data type in SQL command for you
Report Date: 12/5/2003
Prepared by: Zheng Ye
Article last modified on 2004-2-16
The information in this article applies to:
ü Microsoft SQL Server 2000, 7.0
Problem statement:
One day, execute
SELECT * FROM XXX_ORIGINAL_20031205
1. View the version of the databaseSELECT @ @versionSeveral common types of SQL Server patched version numbers:8.00.194 Microsoft SQL Server 20008.00.384 Microsoft SQL Server SP18.00.532 Microsoft SQL Server SP28.00.760 Microsoft SQL Server SP38.00.818 Microsoft
Abstract: In the PL/SQL development process, SQL, PL/SQL can be used to meet most of the requirements. However, in some special cases, standard SQL statements or DML statements in PL/SQL cannot meet your needs. For example, dynamic table creation or an uncertain operation mu
1. view the database versionSelect @ version
Common SQL server patch versions:
8.00.194 Microsoft SQL Server 20008.00.384 Microsoft SQL Server 2000 sp18.00.532 Microsoft SQL Server 2000 sp28.00.760 Microsoft SQL Server 2000 sp38.00.818 Microsoft
A big and comprehensive choice between SQL and functions: Who is a more effective SQL ?, More effective SQL
Reprinted please indicate the source: jiq •'s technical Blog
Note that the Oracle11g database is discussed here. It is not applicable to SQL Server, MYSQL, and other databases.
1. Problem Description
There are t
11. Microsoft SQL server network settingsOverview of Network ServicesSQL Server application interfaceNetwork Connection LibraryNetwork components and SQL server performanceNetwork MonitoringSummaryAfter you install Microsoft SQL Server, you must set its network settings. Up to now, you or your Microsoft Windows NT or Windows 2000 system administrator may have set
Many people do not know how SQL statements are executed in SQL Server, fearing that their written SQL statements will be misunderstood by SQL Server. Like what:
SELECT * FROM table1 where name= ' Zhangsan ' and TID > 10000
and implementation:
SELECT * FROM table1 where TID > 10000 and name= ' Zhangsan '
Some people
Tags: Audit SQL ServerIntroductionAudit is a feature after SQL Server 2008 that tells you "who did what when?" Specifically, auditing an instance of the SQL Server database engine or a separate database involves tracking and documenting events that occur in the database engine. Its bottom-level is based on extended events (Extented event), so its performance and
Today, I would like to share with you the SQL statements, T-SQL usage and syntax, as well as some examples, the purpose is to help everyone to review the basic statements of T-SQL, so that the project can be used more quickly. Of course, it should be learned and summarized for new users.
Today, I would like to share with you the
server| Data | database | Statement SQL SERVER Database Management Common SQL and T-SQL statements
1. View the version of the database
SELECT @ @version
2. View the machine operating system parameters of the databaseEXEC master.. xp_msver
3. View Database Startup Parameterssp_configure
4. View Database Startup timeSelect CONVERT (varchar, login_time,120) fro
Introduction Audit is a feature after SQL Server 2008 that tells you "who did what when?" Specifically, auditing an instance of the SQL Server database engine or a separate database involves tracking and documenting events that occur in the database engine. Its bottom-level is based on extended events (Extented event), so its performance and flexibility are relatively good. Audit data can be exported to aud
Comparison of functions between Visual Basic for Applications and SQL Server Transact-SQL (ADP)Note that the information in this topic applies only to the Microsoft Access Project (. ADP ).
The following table compares common functions in Microsoft Visual Basic for Applications (VBA) and Microsoft SQL Server Transact-SQL
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.