File: sql1.sql

package info (click to toggle)
ohcount 3.0.0-6.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,828 kB
  • sloc: ansic: 6,534; ruby: 2,560; perl: 2,041; erlang: 350; lisp: 272; sh: 244; pascal: 196; vhdl: 150; haskell: 149; asm: 127; cs: 124; awk: 98; java: 92; php: 73; tcl: 58; xml: 57; fortran: 54; makefile: 32; python: 31; ada: 30; objc: 30; jsp: 28; sql: 18; cobol: 13; ml: 9; cpp: 3
file content (31 lines) | stat: -rw-r--r-- 1,153 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
sql	comment	// -----------------------------------------------------------------------
sql	comment	// Filename:   minvalue.sql
sql	comment	// Purpose:    Select the Nth lowest value from a table
sql	comment	// Date:       18-Apr-2001
sql	comment	// Author:     Deepak Rai, SSE, Satyam Computer Services Ltd. India
sql	comment	// -----------------------------------------------------------------------
sql	blank	
sql	comment	## Comment with a hash symbol ##
sql	code	select level, min('col_name') from my_table
sql	code	where level = '&n'
sql	code	connect by prior ('col_name') < 'col_name')
sql	code	group by level;
sql	blank	
sql	comment	/* a block comment
sql	comment	   -- finished here */
sql	blank	
sql	comment	-- Example:
sql	comment	--
sql	comment	-- Given a table called emp with the following columns:
sql	comment	--   id   number
sql	comment	--   name varchar2(20)
sql	comment	--   sal  number
sql	comment	--
sql	comment	-- For the second lowest salary:
sql	comment	--
sql	comment	-- select level, min(sal) from emp
sql	comment	-- where level=2
sql	comment	-- connect by prior sal < sal
sql	comment	-- group by level
sql	comment	--
sql	blank