Estrategia
-------------------------------------------------
2 from emp;
SQL> select ename, sal, comm,
2 sal + nvl(comm,0) as neto-------------------------------------------------
3 from emp;
SQL> select initcap( first_name || ' ' || last_name)
2 from employees
-------------------------------------------------
3 wheredepartment_id = 30;
SQL> select
2 sysdate as Hoy,
3 add_months(sysdate,3) as TresMesesDespues
-------------------------------------------------
4 from dual;
SQL> selectto_date('15-01-2005','DD-MM-YYYY')
2 from dual;
-------------------------------------------------
TO_DATE('15
SQL> select user from dual; RETORNA EL NOMBRE DEL USUARIO
USER------------------------------
HR
-------------------------------------------------
SQL> select * from cat; TABLAS
-------------------------------------------------
SQL> alter user hr identified byhr account unlock; PARA BLOQUEAR USUARIO
SQL> connect hr/hr
Connected.
SQL> select * from cat;
-------------------------------------------------
SQL> select * from tab; PARA VER TODASLAS TABLAS
-------------------------------------------------
SQL> describe emp; PARA DESCRIBIR LOS CAMPOS DE LAS TABLAS
-------------------------------------------------
SQL> select * fromjobs; CONTENIDO DE LA TABLA
-------------------------------------------------
SQL> select distinct department_id from employees; VALORES UNICOS
SQL> select first_name || ' ' || last_name,
2commission_pct
3 from employees
-------------------------------------------------
4 where commission_pct < .15; COMPARATIVOS O DE RANGO
SQL> select first_name, department_id
2from employees
-------------------------------------------------
3 where not (department_id >= 30);
SQL> select first_name, salary
2 from employees
3 where last_name = 'Smith'...
Regístrate para leer el documento completo.