When the data in the table is not required, delete the data and release the occupied space. To delete the data in the table, use the delete statement or the truncate statement.
I. Delete statements
(1) conditional Deletion
Syntax format:
BelowCodeIf the test passes in MySQL, MSSQL should be able to run without testing.
Copy codeThe Code is as follows: # create a table as follows:
Create temporary table TMP (A int, B INT, C INT );
Insert into TMP values (10,100, 1), (, 2), (, 2 );
Now, if a permission number is provided and you want to retrieve the user set with the permission, you need to match the given permission number among multiple permission numbers separated by commas. If you use like, one is less efficient, and the
First, write a batch processing file and give an example.
CopyCodeThe Code is as follows: Set RQ = % Date :~ 0, 10%
Exp system/system's password @ local service name file = D: \ backup \ Bak % RQ % full = Yes log = D: \ backup \ Bak % RQ % buffer =
Let's sum up and answer these two common questions that most netizens are concerned about.
Differences between in and exist
From the perspective of SQL programming, in is intuitive, and exists is not intuitive. There is one more select,In can be
The first case is that the returned cursor is the data of a specific table or view, for example:
SQL-code:
CopyCode The Code is as follows: Create or replace procedure p_testa (
Presult out sys_refcursor
)
As
Begin
Open presult for select * from
Add a user (a schema with the same name as the user is automatically generated as the user is created)
Create user "tester" Profile "default" identified by "tester" default tablespace "testdata" temporary tablespace "testtemp" account unlock;
(To
TO_DATE format (take the time: 2007-11-02:45:25 as an example)
Year:Yytwodigits two-year display value: 07Yyythreedigits: 007Yyyyfourdigits four-digit year display value: 2007
Month:Mmnumber: 11Monabbreviated Character Set indicates the displayed
INSTR (source string, target string, start position, matching serial number)
In Oracle/PLSQL, The instr function returns the position of the string to be truncated in the source string. It is retrieved only once, that is, from the start of the
1. Install the Oracle Client
The premise of connecting to Oracle is to install the Oracle Client on the SQL Server. The Oracle Client is as follows:
Http://www.oracle.com/technetwork/cn/database/enterprise-edition/downloads/index.html
After the
1. Stop various applications at the application layer.
2. Stop the listening process of oralce:
$ Lsnrctl stop
3. Back up the control file under an exclusive system user:
SQL> alter database backup controlfile to trace;
4. Under an exclusive system
Union and Union ALL merge query result sets of SELECT. What are their differences?
Union re-queries the query result set and removes the same rows. Disadvantages: Low Efficiency;
Union ALL only merges the query result set and does not re-query. It
Web_THBC indicates the presentation layer, that is, the page (. aspx)
BLL_THBC is the business logic layer
DAL_THBC is the database interaction layer (Execute SQL statements to the database)
Model_THBC is an entity class.
DbHelper is the
1. after you forget your username and password, the system prompts invalid username and password after you try several Oracle Default usernames and passwords (The table contains the default username and password,
UsernamePasswordDescriptionSee Also
1. What is an execution plan)
Execution Plan: the execution process or access path of a query statement in ORACLE.
Ii. How to view the execution plan
1: Press F5 under PL/SQL to view the execution plan. Third-party tools such as toad.
Many people
1. control user access1. Create and modify user Creating UsersCreate/alter user new_user identified by password;Example: create user user_1 indentified by pwd_1Alter user user_1 identified by pwd_22. grant permissions to usersGrant privilege [,
1. create and manage tables1. Create Table syntax
Create table Name (column datatype [default expr] [, column...])
Default Constraints
2. Create a table using subqueryCreate table NameAsSelect * from u table
Ii. modify a table1. Add a new
1. multiline Functions, also known as Group Functions and Aggregate Functions
1. Types of Group FunctionsAvg, count, max, min, stddev, sum, varianceAvg averageSelect avg (nvl (column 1, 0) from table 1Count calculates the number of rowsAggregate
Principle 1: Pay attention to the connection sequence in the WHERE clause:ORACLE uses the bottom-up sequence to parse the WHERE clause. According to this principle, the join between tables must be written before other WHERE conditions. The
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