Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Chandu yadav
Page 24 of 81
How to select first 10 elements from a MySQL database?
To select first 10 elements from a database using SQL ORDER BY clause with LIMIT 10.The syntax is as followsSELECT *FROM yourTableName ORDER BY yourIdColumnName LIMIT 10;To understand the above syntax, let us create a table. The query to create a table is as followsmysql> create table Clients - > ( - > Client_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, - > ClientName varchar(20) - > ); Query OK, 0 rows affected (0.51 sec)Insert some records in the table using INSERT command.The query is as followsmysql> insert into Clients(ClientName) values('Larry'); Query OK, 1 row affected (0.09 ...
Read MoreHow to select last row in MySQL?
To select the last row, we can use ORDER BY clause with desc (descending) property and Limit 1. Let us first create a table and insert some records with the help of INSERT command. The query is as follows. mysql> create table getLastRecord -> ( -> Id int, -> Name varchar(100) -> ); Query OK, 0 rows affected (0.61 sec) After creating the above table, we will insert records with the help of INSERT command. mysql> insert into getLastRecord values(1, 'John'); Query OK, 1 row affected (0.13 sec) ...
Read MoreHow to improve the ranking of your websites for search engines
Let’s assume that, you want to promote your dance academy. As the owner of the institution, you want more people to know about the types of dance forms being taught in your institute and the other facilities you are providing. The more people know about your academy, the more students you will get. So, with the help of your friends, you built a nice website to reach a wider spectrum of people in your regions which cannot be possible otherwise.Finally, you launched your website keeping your fingers crossed to see the response. A month passed, but you couldn’t see any ...
Read MoreWhy does one need a mentor in life to grow?\\n
Either you want a growth in the current role or kick off a new business, a good mentor can pave the way for you. At your workplace, you might find many individuals who hold a treasure of leadership experiences and people just fall for their intelligence. You can make such people your mentor. Let’ dig out how you can benefit yourself from a good mentor?Who Can Be Your Mentor?Someone who takes his/her career passionately. This person carries a good deal of exposure in terms of experience and leadership and holds the ability to take you at the top from your ...
Read MoreCreate Three Equal Columns with Bootstrap grid Layout
To create three equal columns layout with Bootstrap Grid Layout, you can try to run the following code −Example Bootstrap Example Bootstrap Grid Column One Column Two Column Three Output
Read MoreHTML5 Canvas distorted
If the canvas looks distorted, then try to change the height and width −The default height and width of the canvas in HTML5 is of 2/1 ratio −width = 300 height = 150ExampleLet us see an example − #mycanvas{border:1px solid red;} Output
Read MorePriority of AND and OR operator in MySQL select query?
The AND has the highest priority than the OR operator in MySQL select query.Let us check how MySQL gives the highest priority to AND operator.The query is as followsmysql> select 0 AND 0 OR 1 as Result;The following is the output+--------+ | Result | +--------+ | 1 | +--------+ 1 row in set (0.00 sec)If you are considering the OR operator has the highest priority then MySQL will wrap up the above query like this.The query is as followsselect 0 AND (0 OR 1) as ResultFirst, solve the 0 OR 1, this will give result 1. After that ...
Read MoreDefining internet of things iot for businesses
In today’s world, the biggest technology trend is the ‘Internet of Things (IoT);’ and true enough it is defining our lives, the way we work; shaping and influencing businesses, and governments too. It is the ‘next big thing’ or is simply being termed as a revolution/progression of the web, and is being touted as far bigger than anyone has been able to fathom in technology, where machine to machine and man to machine interaction is moving towards new heights.GuesstimatesIt is estimated that by 2020 there will be around 26 billion devices (as per the firm Gartner) that will be connected ...
Read MoreHow do I add Vibrate and sound for Notification in Android?
This example demonstrate about How do I add Vibrate and sound for Notification in AndroidStep 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. Step 3 − Add the following code to src/MainActivity.javapackage app.tutorialspoint.com.notifyme; import android.app.NotificationManager; import android.content.Context; import android.media.RingtoneManager; import android.net.Uri; import android.support.v4.app.NotificationCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import java.util.Objects; public class MainActivity extends AppCompatActivity { private final static String default_notification_channel_id = "default" ; @Override protected ...
Read MoreGet only digits using regexp in MySQL?
If you want to get only digits using REGEXP, use the following regular expression( ^[0-9]*$) in where clause.Case 1 − If you want only those rows which have exactly 10 digits and all must be only digit, use the below regular expression.SELECT *FROM yourTableName WHERE yourColumnName REGEXP '^[0-9]{10}$';Case 2 − If you want only those rows with the digit either 1 or more, the following is the syntax −SELECT *FROM yourTableName WHERE yourColumnName REGEXP '^[0-9]*$';The above syntax will give only those rows that do not have any any characters.To understand the above syntax, let us create a table. The query ...
Read More