-
Notifications
You must be signed in to change notification settings - Fork 0
/
sql.php
164 lines (163 loc) · 7.91 KB
/
sql.php
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>
</head>
<body>
<?php
include("header.php");
?>
<div class="table-responsive">
<table class="table table-dark table-bordered">
<tr>
<th colspan="2">What is the full form of SQL?</th>
</tr>
<tr>
<td id="q1o1" onclick="wrong(this.id)"> A.Structured Query List</td>
<td id="q1o2" onclick="wrong(this.id)"> B.Simple Query Language</td>
</tr>
<tr>
<td id="q1o3" onclick="correct(this.id)"> C.Structured Query Language</td>
<td id="q1o4" onclick="wrong(this.id)"> D.None of these</td>
</tr>
<tr>
<th colspan="2">Q.Which is the subset of SQL commands used to manipulate Oracle Databasestructures, including tables?</th>
</tr>
<tr>
<td id="q2o1" onclick="correct(this.id)"> A.Data Definition Language(DDL)</td>
<td id="q2o2" onclick="wrong(this.id)"> B.Data Manipulation Language(DML)</td>
</tr>
<tr>
<td id="q2o3" onclick="wrong(this.id)"> C.Both of above</td>
<td id="q2o4" onclick="wrong(this.id)"> D.None</td>
</tr>
<!--###########################-->
<tr>
<th colspan="2">Q. Which operator performs pattern matching?</th>
</tr>
<tr>
<td id="q3o1" onclick="correct(this.id)"> A.LIKE operator</td>
<td id="q3o2" onclick="wrong(this.id)"> B. EXISTS operator</td>
</tr>
<tr>
<td id="q3o3" onclick="wrong(this.id)"> C.BETWEEN operator</td>
<td id="q3o4" onclick="wrong(this.id)"> D.None of these</td>
</tr>
<!--###########################-->
<tr>
<th colspan="2">What operator tests column for the absence of data?</th>
</tr>
<tr>
<td id="q4o1" onclick="wrong(this.id)"> A.EXISTS operator</td>
<td id="q4o2" onclick="wrong(this.id)"> B.NOT operator</td>
</tr>
<tr>
<td id="q4o3" onclick="correct(this.id)"> C.IS NULL operator</td>
<td id="q4o4" onclick="wrong(this.id)"> D.None of these</td>
</tr>
<tr>
<th colspan="2">Q.In SQL, which command(s) is(are) used to change a table's storage characteristics?</th>
</tr>
<tr>
<td id="q5o1" onclick="wrong(this.id)"> A.MODIFY TABLE</td>
<td id="q5o2" onclick="wrong(this.id)"> B.CHANGE TABLE</td>
</tr>
<tr>
<td id="q5o3" onclick="wrong(this.id)"> C.ALTER TABLE</td>
<td id="q5o4" onclick="correct(this.id)"> D.All of the above</td>
</tr>
<!--###########################-->
<tr>
<th colspan="2">Q. In SQL, which of the following is not a data definition language commands?</th>
</tr>
<tr>
<td id="q6o1" onclick="wrong(this.id)"> A.RENAME</td>
<td id="q6o2" onclick="wrong(this.id)"> B.GRANT</td>
</tr>
<tr>
<td id="q6o3" onclick="correct(this.id)"> C.UPDATE</td>
<td id="q6o4" onclick="wrong(this.id)"> D.REVOKE</td>
</tr>
<!--############################################################################################################-->
<tr>
<th colspan="2"> In SQL, which command is used to SELECT only one copy of each set of duplicable rows</th>
</tr>
<tr>
<td id="q7o1" onclick="wrong(this.id)"> A.SELECT UNIQUE</td>
<td id="q7o2" onclick="correct(this.id)"> B.SELECT DISTINCT</td>
</tr>
<tr>
<td id="q7o3" onclick="wrong(this.id)"> C.SELECT DIFFERENT</td>
<td id="q7o4" onclick="wrong(this.id)"> D. All of the above</td>
</tr>
<!--###########################-->
<tr>
<th colspan="2">Q.A command that lets you change one or more fields in a record is</th>
</tr>
<tr>
<td id="q8o1" onclick="wrong(this.id)"> A.Insert</td>
<td id="q8o2" onclick="wrong(this.id)"> B.Look-up</td>
</tr>
<tr>
<td id="q8o3" onclick="correct(this.id)"> C.Modify</td>
<td id="q8o4" onclick="wrong(this.id)"> D.All of the above</td>
</tr>
<!--############################################################################################################-->
<tr>
<th colspan="2">Q.Which of the SQL statements is correct?</th>
</tr>
<tr>
<td id="q9o1" onclick="correct(this.id)"> A.SELECT Username, Password FROM Users</td>
<td id="q9o2" onclick="wrong(this.id)"> B.SELECT Username AND Password FROM Users</td>
</tr>
<tr>
<td id="q9o3" onclick="wrong(this.id)"> C.SELECT Username, Password WHERE Username = 'user1'</td>
<td id="q9o4" onclick="wrong(this.id)"> D.None of these</td>
</tr>
<!--###########################-->
<tr>
<th colspan="2">Q.The FROM SQL clause is used to...</th>
</tr>
<tr>
<td id="q10o1" onclick="wrong(this.id)"> A.specify search condition</td>
<td id="q10o2" onclick="wrong(this.id)"> B.specify range for search condition</td>
</tr>
<tr>
<td id="q10o3" onclick="correct(this.id)"> C.specify what table we are selecting or deleting data FROM</td>
<td id="q10o4" onclick="wrong(this.id)"> D.None of these</td>
</tr>
</table>
</div>
<?php
include("score_btn.php");
?>
<?php
include("footer.php");
?>
<script language="javascript" type="text/javascript">
var x=0,y=0;
function correct(id){
//document.getElementById("print").innerHTML="CORRECT ANSWER";
document.getElementById(id).style.backgroundColor="#00cd00";
document.getElementById(id).style.color="white";
x++;
}
function wrong(id){
//document.getElementById("print").innerHTML="WRONG ANSWER";
document.getElementById(id).style.backgroundColor="#ff0000";
document.getElementById(id).style.color="white";
y++;
}
function score(){
//document.getElementById("print").innerHTML=x+"/"+(x+y);
alert("YOU SCORE :-"+x+"/"+(x+y));
}
</script>
</body>
</html>