Priya Pallavi has Published 70 Articles

How can I check the version of MySQL Server?

Priya Pallavi

Priya Pallavi

Updated on 20-Jun-2020 11:19:18

369 Views

With the help of ‘mysqladmin’ program we would be able to know about the version of our MySQL server. To get the version we should have to write the following command on command line −C:\mysql\bin>mysqladmin -u root version mysqladmin Ver 8.42 Distrib 5.7.20, for Win64 on x86_64 Copyright (c) 2000, 2017, ... Read More

What kind of SQL statements can be used to prepare statements?

Priya Pallavi

Priya Pallavi

Updated on 20-Jun-2020 10:56:22

57 Views

Actually, it is not possible to prepare all SQL statements because MySQL only allows the following kinds of SQL statements that can be prepared:SELECT statementsExamplemysql> PREPARE stmt FROM 'SELECT tender_value from Tender WHERE Companyname = ?'; Query OK, 0 rows affected (0.09 sec) Statement prepared mysql> SET @A = ... Read More

How can we check the default character sets of a particular MySQL database?

Priya Pallavi

Priya Pallavi

Updated on 20-Jun-2020 07:32:16

85 Views

Following is the query to check default character set of the particular MySQL database −mysql> SELECT SCHEMA_NAME 'DatabaseName', default_character_set_name 'Charset' FROM information_schema.SCHEMATA where schema_name = 'db_name';ExampleFor example, the query below will return the default character set of a database named ‘Sample’ −mysql> SELECT SCHEMA_NAME 'DatabaseName', default_character_set_name 'Charset' FROM information_schema.SCHEMATA where ... Read More

How can we obtain the part of a date in MySQL?

Priya Pallavi

Priya Pallavi

Updated on 20-Jun-2020 06:06:06

185 Views

By using EXTRACT() function we can obtain the part from current date or from given date. The parts of the date can be obtained in the form of year, month, days, hours, minutes, seconds and microseconds.Examplesmysql> Select EXTRACT(Year from NOW()) AS YEAR; +-------+ | YEAR  | +-------+ |   2017| ... Read More

Why should we not use ++, -- operators in JavaScript?

Priya Pallavi

Priya Pallavi

Updated on 19-Jun-2020 13:37:49

123 Views

The increment (++) and decrement (---) operators should be avoided since it can lead to unexpected results. Here are some of the conditions −ExampleIn an assignment statement, it can lead to unfavorable results −Live Demo                             ... Read More

What is onkeydown event in JavaScript?

Priya Pallavi

Priya Pallavi

Updated on 19-Jun-2020 11:17:27

253 Views

The onkeydown event triggers when a key is pressed. You can try to run the following code to learn how to work with an onkeydown event in JavaScript −Example                                            

How to create RegExp object in JavaScript?

Priya Pallavi

Priya Pallavi

Updated on 19-Jun-2020 08:46:00

105 Views

A regular expression is an object that describes a pattern of characters. The JavaScript RegExp class represents regular expressions, and both String and RegExp define methods that use regular expressions to perform powerful pattern-matching and search-and-replace functions on the text.A regular expression could be defined with the RegExp () constructor, ... Read More

How to get the only current year in JavaScript?

Priya Pallavi

Priya Pallavi

Updated on 18-Jun-2020 09:24:47

2K+ Views

To get an only current year, use the JavaScript getFullYear() method. JavaScript date getFullYear() method returns the year of the specified date according to local time. The value returned by getFullYear() is an absolute number. For dates between the years 1000 and 9999, getFullYear() returns a four-digit number, for example, ... Read More

What are the 6 ways to use this keyword in Java?

Priya Pallavi

Priya Pallavi

Updated on 18-Jun-2020 07:53:10

2K+ Views

this can be used to get the current object.this can be used to invoke current object's method.this() can be used to invoke current class constructorthis can be passed as a parameter to a method call.this can be passed as a parameter to a constructor.this can be used to return the ... Read More

How to find cosine of an angle using Python?

Priya Pallavi

Priya Pallavi

Updated on 17-Jun-2020 13:19:23

1K+ Views

Python comes with an amazing standard math library that provides all trigonometric functions like sin, cos, etc. You can import that library and use these functions. Note that these functions expect angles in radians. For example, import math angle1 = math.radians(90) angle2 = math.radians(60) print(math.cos(angle1)) print(math.cos(angle2))This will give the output:6.123233995736766e-17 ... Read More

Advertisements