易截截图软件、单文件、免安装、纯绿色、仅160KB

1.The SQL introuduction

Introducing Oracle Database 11g
List the features of Oracle Database 11g
Discuss the basic design, theoretical and physical aspects of a relational database
Categorize the different types of SQL statements
Describe the data set used by the course
Log onto the database using the SQL Developer environment
Save queries to files and use script files in SQL Developer
Retrieving Data Using the SQL SELECT Statement
List the capabilities of SQL SELECT statements
Generate a report of data from the output of a basic SELECT statement
Select All Columns
Select Specific Columns
Use Column Heading Defaults
Use Arithmetic Operators
Understand Operator Precedence
Learn the DESCRIBE command to display the table structure
Restricting and Sorting Data
Write queries that contain a WHERE clause to limit the output retrieved
List the comparison operators and logical operators that are used in a WHERE clause
Describe the rules of precedence for comparison and logical operators
Use character string literals in the WHERE clause
Write queries that contain an ORDER BY clause sort the output of a SELECT statement
Sort output in descending and ascending order
Using Single-Row Functions to Customize Output
Describe the differences between single row and multiple row functions
Manipulate strings with character function in the SELECT and WHERE clauses
Manipulate numbers with the ROUND, TRUNC and MOD functions
Perform arithmetic with date data
Manipulate dates with the date functions
Using Conversion Functions and Conditional Expressions
Describe implicit and explicit data type conversion
Use the TO_CHAR, TO_NUMBER, and TO_DATE conversion functions
Nest multiple functions
Apply the NVL, NULLIF, and COALESCE functions to data
Use conditional IF THEN ELSE logic in a SELECT statement
Reporting Aggregated Data Using the Group Functions
Use the aggregation functions in SELECT statements to produce meaningful reports
Create queries that


相关文档:

在SQL Server里查看当前连接的在线用户数

 在SQL Server里查看当前连接的在线用户数
use master
select loginame,count(0) from sysprocesses
group by loginame
order by count(0) desc
select nt_username,count(0) from sysprocesses
group by nt_username
order by count(0) desc
如果某个SQL Server用户名test连接比较多,查看它来自的主机名:
......

SQL 判断身份证号码

现要求查询界面:不论15位或者18位身份证号都能查询出数据库中所有当前用户信息。
方案1:
create or replace function CONVERT_ID_15 (/*转换身份证号为15位*/
  p_id2 in varchar2
) return varchar2
is
  p_id varchar2(20);
  id varchar2(15);
begin
  p_id:=ltrim(p_id2);
  p_id ......

sql 心得

1、select 1 from mytable;与select anycol(目的表集合中的任意一行) from mytable;与select * from mytable 作用上来说是没有差别的,都是查看是否有记录,一般是作条件用的。select 1 from 中的1是一常量,查到的所有行的值都是它,但从效率上来说,1>anycol>*,因为不用查字典表。
2、查看记录条数可以用select ......

sql语句,取出表A中的第31条到40条记录

 sql语句,取出表A中的第31条到40条记录(表A以自动增长的ID做主键,注意ID可能是不连续的)
-->select top 10 * from a where id not in (select top 30 id from a order by id) order by id
    查询前十条记录,但条件是:ID不在前三十条的ID里面
-->select top 10 * from (select top 40 ......

Oracle常用Sql语句

1. 创建视图:
CREATE OR REPLACE VIEW SM_V_UNIT_AUTH AS
SELECT T2.UNIT_ID,
        T2.SUPER_UNIT_ID,
        T1.AUTH_ID,
        T1.AUTH_NAME,
        T1.A ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号