1、连接
SQL*Plus system/manager2、显示当前连接用户
SQL> show user3、查看系统拥有哪些用户
SQL> select * from all_users;4、新建用户并授权
SQL> create user a identified by a;(默认建在SYSTEM表空间下)
SQL> grant connect,resource to a;5、连接到新用户
SQL> conn a/a6、查询当前用户下所有对象
SQL> select * from tab;7、建立第一个表
SQL> create table a(a number);8、查询表结构
SQL> desc a9、插入新记录
SQL> insert into a values(1);10、查询记录
SQL> select * from a;11、更改记录
SQL> update a set a=2;12、删除记录
SQL> delete from a;13、回滚
SQL> roll;
SQL> rollback;14、提交
SQL> commit;15、删除一条空语句
SQL>delete from a where key is null;
SQL*Plus system/manager2、显示当前连接用户
SQL> show user3、查看系统拥有哪些用户
SQL> select * from all_users;4、新建用户并授权
SQL> create user a identified by a;(默认建在SYSTEM表空间下)
SQL> grant connect,resource to a;5、连接到新用户
SQL> conn a/a6、查询当前用户下所有对象
SQL> select * from tab;7、建立第一个表
SQL> create table a(a number);8、查询表结构
SQL> desc a9、插入新记录
SQL> insert into a values(1);10、查询记录
SQL> select * from a;11、更改记录
SQL> update a set a=2;12、删除记录
SQL> delete from a;13、回滚
SQL> roll;
SQL> rollback;14、提交
SQL> commit;15、删除一条空语句
SQL>delete from a where key is null;
解决方案 »
- oracle 按地区分组统计
- PL/SQL Developer登录时,connect as 选项有什么作用。
- 有谁知道在哪张系统表中保存着所有用户表的字段名称,及字段类型信息及主键字段名称信息?
- oracle的集群方面的问题
- Oracle有没有提供对表的内容可视化编辑的工具呀?
- 两个版本oracle数据库链接的问题
- ora-12571 TNS: 包写入程序失败。客户机突然连不上服务器了,求救!!!!!
- 对(求问oracle下分组统计问题,急! 贴号:5997583)的加分2
- 警告: 创建的过程带有编译错误。在线等,谢谢!!!
- oracle 11g r2 安装时参数设置问题
- 应用程序双击启动一会后就消失,无法打开.log_file ,trc_file,log_status文件显示如下错误:
- 监听服务的问题,启动不了:(
@ ("at" sign)
Runs the specified command file.
@@ (double "at"
sign)
Runs the specified command file which is expected to be in the same directory as the script that called it.
/ (slash)
Executes the SQL command or PL/SQL block.
ACCEPT
Reads a line of input and stores it in a given user variable.
APPEND
Adds specified text to the end of the current line in the buffer.
ARCHIVE LOG
Starts or stops the automatic archiving of online redo log files, manually (explicitly) archives specified redo log files, or displays information about redo log files.
ATTRIBUTE
Specifies display characteristics for a given attribute of an Object Type column, and lists the current display characteristics for a single attribute or all attributes.
BREAK
Specifies where and how formatting will change in a report, or lists the current break definition.
BTITLE
Places and formats a specified title at the bottom of each report page, or lists the current BTITLE definition.
CHANGE
Changes text on the current line in the buffer.
CLEAR
Resets or erases the current clause or setting for the specified option, such as BREAKS or COLUMNS.
COLUMN
Specifies display characteristics for a given column, or lists the current display characteristics for a single column or for all columns.
COMPUTE
Calculates and prints summary lines, using various standard computations, on subsets of selected rows, or lists all COMPUTE definitions.
CONNECT
Connects a given user to Oracle.
COPY
Copies results from a query to a table in a local or remote database.
DEFINE
Specifies a user variable and assigns it a CHAR value, or lists the value and variable type of a single variable or all variables.
DEL
Deletes one or more lines of the buffer.
DESCRIBE
Lists the column definitions for the specified table, view, or synonym or the specifications for the specified function or procedure.
DISCONNECT
Commits pending changes to the database and logs the current user off Oracle, but does not exit SQL*Plus.
EDIT
Invokes a host operating system text editor on the contents of the specified file or on the contents of the buffer.
EXECUTE
Executes a single PL/SQL statement.
EXIT
Terminates SQL*Plus and returns control to the operating system.
GET
Loads a host operating system file into the SQL buffer.
HELP
Accesses the SQL*Plus help system.
HOST
Executes a host operating system command without leaving SQL*Plus.
INPUT
Adds one or more new lines after the current line in the buffer.
LIST
Lists one or more lines of the SQL buffer.
PASSWORD
Allows a password to be changed without echoing the password on an input device.
PAUSE
Displays the specified text, then waits for the user to press [Return].
PRINT
Displays the current value of a bind variable.
PROMPT
Sends the specified message to the user's screen.
EXIT
Terminates SQL*Plus and returns control to the operating system. QUIT is identical to EXIT.
RECOVER
Performs media recovery on one or more tablespaces, one or more datafiles, or the entire database.
REMARK
Begins a comment in a command file.
REPFOOTER
Places and formats a specified report footer at the bottom of each report, or lists the current REPFOOTER definition.
REPHEADER
Places and formats a specified report header at the top of each report, or lists the current REPHEADER definition.
RUN
Lists and executes the SQL command or PL/SQL block currently stored in the SQL buffer.
SAVE
Saves the contents of the SQL buffer in a host operating system file (a command file).
SET
Sets a system variable to alter the SQL*Plus environment for your current session.
SHOW
Shows the value of a SQL*Plus system variable or the current SQL*Plus environment.
SHUTDOWN
Shuts down a currently running Oracle instance.
SPOOL
Stores query results in an operating system file and, optionally, sends the file to a printer.
START
Executes the contents of the specified command file.
STARTUP
Starts an Oracle instance and optionally mounts and opens a database.
STORE
Saves attributes of the current SQL*Plus environment in a host operating system file (a command file).
TIMING
Records timing data for an elapsed period of time, lists the current timer's title and timing data, or lists the number of active timers.
TTITLE
Places and formats a specified title at the top of each report page, or lists the current TTITLE definition.
UNDEFINE
Deletes one or more user variables that you defined either explicitly (with the DEFINE command) or implicitly (with an argument to the START command).
VARIABLE
Declares a bind variable that can be referenced in PL/SQL.
WHENEVER OSERROR
Exits SQL*Plus if an operating system command generates an error.
WHENEVER SQLERROR
Exits SQL*Plus if a SQL command or PL/SQL block generates an error.
然后如何执行呢
回车不行啊
1 select * from table;
2 select * from table
/