- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Vikyath Ram has Published 151 Articles
Vikyath Ram
158 Views
MySQL cannot perform a case-sensitive comparison when comparing characters. It can be illustrated with the following example from table ‘Employee’ having the following data −mysql> Select * from Employee; +----+--------+--------+ | ID | Name | Salary | +----+--------+--------+ | 1 | Gaurav | 50000 | | 2 | Rahul ... Read More
Vikyath Ram
148 Views
When invoked with an integer argument, RAND( ) uses that value to seed the random number generator. Each time you seed the generator with a given value, RAND( ) will produce the same sequence of random numbers. Following example will demonstrate it −Examplemysql> Select RAND(1), RAND(1), Rand(1); +---------------------+---------------------+---------------------+ | RAND(1) ... Read More
Vikyath Ram
64 Views
As we know that NULL fails equality comparison with any value hence if the search string, provided in FIELD() function, is NULL then MySQL returns 0 as output.Examplemysql> Select FIELD(NULL,'Ram','is','good','boy'); +-------------------------------------+ | FIELD(NULL,'Ram','is','good','boy') | +-------------------------------------+ | 0 | +-------------------------------------+ 1 row in set (0.00 sec)
Vikyath Ram
176 Views
With the help of DISTINCT keyword in SELECT statement, we can get the unique rows in MySQL result set.Examplemysql> Select * from names; +------+-----------+ | id | name | +------+-----------+ | 1 | Rahul | | 2 | Gaurav | | ... Read More
Vikyath Ram
52 Views
As we know that MySQL supports foreign key for referential integrity but it does not support CHECK constraint. But we can emulate them by using triggers. It can be illustrated with the help of an example given below −ExampleSuppose we have a table named ‘car1’ which can have the fix ... Read More
Vikyath Ram
316 Views
We can apply the PRIMARY KEY constraint to a column of an existing MySQL table with the help of ALTER TABLE statement. SyntaxALTER TABLE table_name MODIFY colum_name datatype PRIMARY KEY; OR ALTER TABLE table_name ADD PRIMARY KEY (colum_name); Suppose we have the following table ... Read More
Vikyath Ram
131 Views
To define a variable in C++, you need to use the following syntax −Syntaxdatatype variable_name;You need to know what type of data is your variable is going to hold and what it will be called. The variable name has constraints on what you can name it. Following are the rules ... Read More
Vikyath Ram
469 Views
C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It is a superset of C, and that virtually any legal C program is a legal C++ program. C++ runs on a variety of platforms, such as Windows, Mac OS, and ... Read More
Vikyath Ram
1K+ Views
Following is the required program.ExampleLive Demopublic class Tester { static int factorial(int n) { if (n == 0) return 1; else return (n * factorial(n - 1)); } public static void main(String args[]) { int i, fact = 1; int number = 5; fact = factorial(number); System.out.println(number + "! = " + fact); } }Output5! = 120