Ads
Thursday, May 29, 2014
Monday, March 31, 2014
Oracle 11g – How to login "scott/tiger" accounts after installment
After
I have successfully installed the Oracle 11g, I wanted to use SQL*plus.
However, when I tried to connect database as login name: sys, I found
the account is locked. Later I tried to login with "system" account,
then alter and active scott/tiger. Here are steps for these actions.
1. SQL> conn user/password;
SQL> conn sys/private password;
Error message is displayed: the account is locked.
2. Try to login as "system" - pass
SQL> conn system/password;
3. Unlock "scott"
SQL> alter user scott account unlock;
4. Can change "tiger":
SQL> alter user scott identified by tiger;
5. SQL> conn scott/tiger; -Success
Tuesday, March 25, 2014
SQL ORDER BY
The ORDER BY clause is used in a SELECT statement to sort results either
in ascending or descending order. Oracle sorts query results in
ascending order by default.
SQL> Select ename,sal, from emp where sal > 100 order by ename desc; (DESCENDING ORDER)
SQL> Select ename,sal from emp where sal > 100 order by ename (BY DEFAULT ASCENDING ORDER)
SQL> Select ename,sal,comm from emp order by 1;
(In the Above Query ORDER BY 1 is Taking Column Name from Select Option)
Ename-> Column 1.
Sal-> Column 2.
SQL> Select ename,sal, from emp where sal > 100 order by ename desc; (DESCENDING ORDER)
SQL> Select ename,sal from emp where sal > 100 order by ename (BY DEFAULT ASCENDING ORDER)
SQL> Select ename,sal,comm from emp order by 1;
(In the Above Query ORDER BY 1 is Taking Column Name from Select Option)
Ename-> Column 1.
Sal-> Column 2.
Tuesday, March 18, 2014
Sunday, March 16, 2014
First We Need to Familiar with SELECT Statement before going into other Statements.
Remember: SELECT is a Data Manipulation Langauage.
First, We Should Install Oracle 9i,10G or 11G in your System.
Remember: 9i (i means Internet) and 10g (g means GRID)
Second, Open SQLPLUS and Enter Username:scott and Password: tiger.
Your SQL PLUS is Now Ready to Type the Queries
Remember: SELECT is a Data Manipulation Langauage.
First, We Should Install Oracle 9i,10G or 11G in your System.
Remember: 9i (i means Internet) and 10g (g means GRID)
Second, Open SQLPLUS and Enter Username:scott and Password: tiger.
Your SQL PLUS is Now Ready to Type the Queries
What is SQL ?
structured query language, and pronounced either see-kwell or as separate letters. SQL is a standardized query language for requesting information from a database. The original version called SEQUEL (structured English query language) was designed by an IBM research center in 1974 and 1975. SQL was first introduced as a commercial database system in 1979 by Oracle Corporation.
structured query language, and pronounced either see-kwell or as separate letters. SQL is a standardized query language for requesting information from a database. The original version called SEQUEL (structured English query language) was designed by an IBM research center in 1974 and 1975. SQL was first introduced as a commercial database system in 1979 by Oracle Corporation.
Subscribe to:
Posts (Atom)