To get the primary key of a table, you can use the show command. The syntax is as follows −SHOW INDEX FROM yourDatebaseName.yourTableName WHERE Key_name = 'PRIMARY';Suppose, we have a table with two primary keys; one of them is “Id” and second is “RollNum". The query for a table is as follows −mysql> create table TwoOrMorePrimary −> ( −> Id int, −> Name varchar(200), −> RollNum int −> , −> Primary key(Id, Age) −> ); Query OK, 0 rows affected (0.85 sec)Apply the above syntax to get primary key of a table. ... Read More
Report writing is a part of academic writing. It is an informational work, such as writing, speech, made with the intention of providing information or recounting events in a presentable form, such that it can be published in a magazine or newspaper.Steps to Write A Report for A College Event Held PreviouslyGather Facts - This is the most extensive and the laborious part. You must know the inside-out phenomena, e.g. who was the chief guest, what was the exact time when the valediction ceremony was conducted. Never keep the facts in your mind, as you might forget in stress and ... Read More
To update the column size, you can use alter command. The syntax is as follows −alter table yourTableName change yourColumnName yourColumnName data type;To understand the above syntax, let us create a table. The query to create a table −mysql> create table DataTruncated −> ( −> id int, −> Name varchar(5) −> ); Query OK, 0 rows affected (0.64 sec)Look at the column ‘Name’ above, the column size is 5. Whenever we will give the size greater than 5 then MySQL gives the following error −mysql> ... Read More
“Life is not complex. We are complex. Life is simple, and the simple thing is the right thing.” — Oscar Wilde.When I read such amazing quotations about simplicity, I feel like step out and explore the meaning and vastness of simplicity. In fact, William Hazlitt in his prose piece, On familiar style is scornful of the writers whose writing style is pedantic, with affectation and pretense, showy and gaudy, and thus it lacks a familiar style and even common sense too.How Can It Be Achieved?Simplicity can only be harvested from within, through hard work, engagement, and insight. This is even ... Read More
A ternary conditional operator looks like ?: in programming language like C, C++, Java etc. The syntax is as follows −(yourCondition) ? statement1:statement2;In the above syntax, if yourCondition becomes true then statement1 will evaluate and if yourCondition becomes false then statement2 will evaluate.But the above syntax does not work in MySQL. We can use IF() function from MySQL for the same purpose.Let us see an example −Case 1mysql> select if(3 > 5, 'Condition is true', 'Condition is not true') as ConditionalResult;The following is the output in which second statement evaluates since is 3 isn’t more than 5 −+-----------------------+ | ConditionalResult ... Read More
Ragtag: A group of people perceived as disreputable or undesirable.Lynch: (of a mob) kill (someone), especially by hanging, for an alleged offence with or without a legal trial.Gimcrack: A cheap and showy ornament; a knickknack or flimsy or poorly made but deceptively attractive.Vogie: Conceited, proud, cheerfulCarte Blanche: Unconditional authority; full discretionary power.Tummler: Any lively, prankish, or mischievous man.Hoity-Toity: Assuming airs; pretentious; haughty.Magisterial: Authoritative, weighty; of importance or consequence; of, relating to, or befitting a master: a magisterial pronouncement by the director of the board.Coeval: Of the same age, date, or duration; equally old: Analysis has proved that this manuscript is ... Read More
The FM receiver is the whole unit which takes the modulated signal as input and outputs the original audio signal. Radio amateurs are the initial radio receivers. They had got drawbacks such as poor sensitivity and selectivity.Selectivity is the selection of a particular signal while rejecting the others. Sensitivity is the capacity of detecting RF signal and demodulating it, while at the lowest power level. Both Selectivity and Sensitivity should be high for an FM receiver. To overcome these drawbacks of the ordinary receiver, the superheterodyne receiver was invented. This FM receiver consists of 5 main stages.RF Tuner SectionThe modulated ... Read More
Some situations, we have to restrict an edit text for some characters. To solve this situation, in this example demonstrate how to Counting Chars in Edit Text Changed Listener.Step 1 - Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 - Add the following code to res/layout/activity_main.xml. In the above code, we have taken one edit text. It going to check the length of the entered characters, if it exceeds 5 then it shows an error message.Step 3 - Add the following ... Read More
Calculate Age based on date of birth with the help of DATE_FORMAT() method in MySQL. Firstly, get the current date time with the help of now() method and you can place your date of birth in DATE_FORMAT().The syntax is as follows −SELECT DATE_FORMAT(FROM_DAYS(DATEDIFF(now(), 'yourDateofbirth')), '%Y')+0 AS anyVariableName;Apply the above syntax to calculate age from yourDateofbirth. In the above syntax, replace yourDateofbirth with your date of birth. The query is as follows −SELECT DATE_FORMAT(FROM_DAYS(DATEDIFF(now(), '2010-11-25')), '%Y')+0 AS Age;The following is the output −+------+ | Age | +------+ | 8 | +------+ 1 row in set (0.00 sec)Let ... Read More
In order to install MySQL command line client for Windows, you need to visit the following URL to get the download link https://dev.mysql.com/downloads/mysql/ −The snapshot is as follows −After that you need to select operating system. The snapshot is as follows −You need to choose Windows (x86, 32/64-bit) and download the installer.
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP