-
Notifications
You must be signed in to change notification settings - Fork 0
/
Experiment03.txt
65 lines (34 loc) · 1.22 KB
/
Experiment03.txt
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SELECT CEIL(8.29) FROM dual;
SELECT FLOOR(9.76) FROM dual;
SELECT SQRT(100) FROM dual;
SELECT CEIL(8.29) FROM dual;
SELECT LEAST('a','b','c') FROM dual;
SELECT GREATEST('a','b','c') FROM dual;
SELECT SYSTIMESTAMP FROM dual;
SELECT TO_CHAR(sysdate,'mm/dd/yyyy hh24:mi:ss') FROM dual;
SELECT ABS(-8.29) FROM dual;
CREATE TABLE angle(
angle int,
sin decimal(10,2),
cos decimal(10,2),
tan decimal(10,2),
cot decimal(10,2),
sec decimal(10,2));
INSERT INTO angle (angle) values (0);
INSERT INTO angle (angle) values (30);
INSERT INTO angle (angle) values (45);
INSERT INTO angle (angle) values (60);
INSERT INTO angle (angle) values (90);
UPDATE angle SET sin = sin(angle*3.14/180);
UPDATE angle SET cos = cos(angle*3.14/180);
UPDATE angle SET tan = tan(angle*3.14/180) WHERE angle!=90;
UPDATE angle SET cot = cos/sin WHERE sin!=0;
UPDATE angle SET sec = 1/cos WHERE cos!=0;
SELECT * FROM angle;
SELECT REVERSE('nmutuAotedOehT') FROM dual;
SELECT LTRIM(' 123223XYZTech') FROM dual;
SELECT RTRIM('123223XYZTech ') FROM dual;
SELECT RPAD('Computer',12,'x') FROM dual;
SELECT LENGTH('DatabaseManagementSystems') FROM dual;
SELECT CONCAT('Julius ','Caesar') FROM dual;
SELECT SUBSTR('India is my country',7,2) FROM dual;