Common commands and functions of Oracle SQL * plus, oracleplus
Common commands:
Connect to sqlplusRun cmd in the command line to enter. For example, to log on in sys mode, the command is as follows:(1). sqlplus "sys/zhb126 as sysdba"
(2). sqlplus/nolog connect sys/zhb126 as sysdba
(3). sqlplus scott/tiger
Start a database instance
Startup -- start the control fil
Using system. data. the sqlclient namespace can only execute one SQL statement or multiple Content in the middle; separate, cannot execute similar commands, is there a way to execute some batch commands like a query analyzer, the answer is to execute it through osql.
Detailed usage of osql: http://technet.microsoft.com/zh-cn/library/ms162806.aspx
Call through the
Tags: character dev large database information Management DBA needs to run develop fromI. Classification of databases I. Classification of databases1. Small database: Access, Foxbase2. Medium database: Informix, SQL Server, MySQL3. Large database: Sybase, DB2, Oracle Second, how to reasonably use the database in the project, can be based on the following three aspects to start1, the size of the projectA, h
XML Auto Features and T-SQL commands
As a DBA, I tend to focus on performance issues, so I want to make sure that using XML (an Extensible Markup language) does not have an impact on performance. In this article, I'll show the difference in performance by comparing the XML Auto feature with the standard T-SQL command. During my testing, I'll just cover a small,
It is estimated that SQL * Plus is used almost at the beginning in Oracle,
After all, this tool can run on any platform running Oracle,
You can install this tool on the client or on the server,
To install the client, install the client software provided by Oracle,
On the server side, it is automatically installed when Oracle is installed,
SQL * Plus is a C/S-based SQL
Server
The first thing to note is that the content of this article is not how to adjust SQL Server query performance (to write a book about this), but how to use set STATISTICS IO and set STATISTICS in the tuning of SQL Server query performance Time these two Transact-SQL commands that are often ignored.
On the surfac
Label:Let's start a new chapter to learn! When an SQL statement is entered, the statement is present in the SQL buffer (that is, a memory area). This SQL buffer is small and can only have one SQL statement, and the SQL statement that was originally in the buffer is overwritt
saved. We can modify the SQL statement stored in SQL buffer and execute it again. SQL * plus generally deals with databases.Apart from SQL * plus statements, other statements executed in SQL * plus are called SQL * plus
Important SQL Commands
SELECT -Extract data from the database
Update-Updates the data in the database
Delete-deletes data from the database
INSERT INTO-inserts new data into the database
CREATE database-creating new databases
alter database-Modify Databases
CREATE TABLE-Creates a new table
ALTER TABLE -Change (change) database table
Drop Table-delete tables
: Back up SQL Server---CreateDevice for backing up dataUse masterEXEC sp_addumpdevice disk, Testback,C:\mssql7backup\MyNwind_1.dat---start BackupBACKUP DATABASE pubs to Testback27. Description: Create a new tableCREATE TABLE TabName (col1 type1 [NOT NULL] [primaryKey],col2 type2 [NOT NULL],..)To create a new table from an existing table:A:create Table Tab_newLike Tab_old (create new table with old table)B:create table tab_new as Select Col1,col2 ...Fr
Import directly in MySQLQureyBrower *. SQL scripts cannot execute multiple SQL commands at a time. Execute the SQL FILE command mysqlsourced: myprogramdatabasedb in mysql. SQL; Appendix mysql Common commands: 1) connect to MYSQL:
Supported commands
Besides all SQL statements, the command window supports the following standard SQL * Plus commands in this release:
Command
Meaning
/
Executes the SQL Buffer
? [Keyword]
Provides SQL
MySQL imports and exports SQL files and common commands directly into * SQL scripts in MySQLQureyBrower. multiple SQL commands cannot be executed at a time. execute the SQL file command mysqlsourcec: testsql in mysql; the followin
deals with databases.
What is ddl dml dcl.
DDL database definition language, including create drop alter
DML database management language, including select update delete
DCL Database Control Language, including grant and revoke
The following describes some common SQL * Plus commands:
-->
$velocityCount-->
-->
1. how to connect to a database is verified by the operating system:
Import directly in MySQLQureyBrower *. SQL scripts cannot execute multiple SQL commands at a time. The following describes how to import and export MySQL. SQL files and common commands are directly imported into MySQL Qurey Brower *. SQL
Browser
This article demonstrates how to construct a SQL gateway application with a Java Servlet, a JSP page, and a static Java class. With this application, you can execute SQL commands directly in the browser, and the browser will submit the SQL commands to the database sy
MySQL import. SQL file and common commands bitsCN.com
MySQL import. SQL file and common commands
Directly import the *. SQL script in MySQL Qurey Brower. you cannot execute multiple SQL comm
of the currency1.txt
AED Emirati dirham 1998-06-01 00:00:00.000
AFA Afghani 1998-06-01 00:00:00.000
... ... ...
... ... ...
ZWD Zimbabwe Dollar 1998-06-01 00:00:00.000
When you log in using a password, you need to enclose the-u username and the post-p password with double quotes.
Note: In addition to being able to execute in the console, BCP can also run bcp in SQL statements by calling a system stored procedure of
Use an SQL statement to add or delete a modified Field
1. Add a field
Alter table docdsp add dspcode
Char (200)
2. delete a field
Alter table table_name drop Column
Column_name
3. Modify the field type
Alter table table_name alter Column
Column_name new_data_type
4. Change the name of sp_rename.
Change the name of the user-created object (such as a table, column, or user-defined data type) in the current database.
Syntax
Sp_rename [@ objname =]
'Obje
" with "new text" in the current line ".Note that there is no space between C/oldtext/newtext,/oldtext and/newtext. If C/DEPT/EMP is used in the following example, the "SP2-0023: no string found" error occurs.
SQL> select ename, deptno, Sal2 from Dept3 where SAL> 10004 order by Sal DESC;Where SAL> 1000*Row 3 has an error:The ORA-00904: "Sal": Invalid identifier
SQL> L1 select ename, deptno, Sal2 from Dept3
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.