SQL BASIC QUERIES
SQL>Conn /as sysdba
(Conn Username/Password)
1. SQL>Show user;
USER is SYSTEM
2. SQL>select banner from v$version;
BANNER
----------------------------------------
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
"CORE 10.2.0.1.0 Production"
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 – Production
3. SQL>Select global_name from global_name;
GLOBAL_NAME
XE
4. SQL> Select * from tab;
It displays all the tables from Database.
5. SQL> Select * from all_users;
It shows the list of users.
6. SQL>Clear scr;
It clears the screen.
There are two types of tables in Oracle
1. SYSTEM TABLES (or) DATA DICTIONARY TABLES (or) PREDEFINED TABLES.
2. USER DEFINED TABLES.
SQL – STRUCTURED QUERY LANGUAGE
DDL (Data Definition Language)
CREATE, ALTER, DROP, RENAME, TRUNCATE
DML (DATA MANIPULATION LANGUAGE)
INSERT, UPDATE, DELETE
DQL (DATA QUERY LANGUAGE)
SELECT
TCL (TRANSACTIONAL CONTROL LANGUAGE)
COMMIT, ROLLBACK
DCL (DATA CONTROL LANGUAGE)
GRANT, REVOKE
LINKS TO SQL :
http://st-curriculum.oracle.com/tutorial/SQLDeveloper/index.htm
http://www.vacic.org/lib/sql/
http://beginner-sql-tutorial.com/sql.htm
http://www.w3schools.com/sql/default.asp
PL/SQL
http://www.plsql-tutorial.com/
No comments:
Post a Comment