Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

How to subtract two column of different table using sql query

I Have 2 tables WIthdrawMaterial and DepositMaterial,Both In WithdrawMaterial contain quantity column, and DepositMaterial contain totalDeposit ,I want to perform subtraction between quantity and totalDeposit column using query and store the resu...

How to solve ArrayIndexOutOfBoundsException in Java?

I want to insert a csv data into a MySQL table. When I run the code, I've got the following error message. Any suggestions? java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3     at BudgetTrackerCu...

How to Use Calculation of an Aggregate Function as Filter Criteria?

I have tables on booking orders for trips. Bookings (booking_id, booking_time, driver_id, customer_id) Drivers (driver_id, name) I need to identify all customers who have had at least 60% of their bookings completed by the same driver within t...

Problems in writing sql queries anyone who can write following queries?

1. List all the directors who directed a film in a leap year by using SELECT statement 2. Find the film(s) with the largest cast using SELECT statement 3. Find all actors who acted only in films before 1960 using SELECT state...

How to Solve PHP Connectivity Error with MySQL

<?php if(isset ($_POST['Signup'])) { $file_name = $_FILES['image']['name']; $file_tmp =$_FILES['image']['tmp_name']; $file_ext=strtolower(end(explode('.',$_FILES['image']['name...

How to Execute Multiple Insert Queries in NodeJs Application?

I am trying to perform an insert query, use the insertid of the row and then perform another insert query using the inert id. the first query is executing but the second query is not. please help. Below is my code: $("#addopdfrm").subm...

Enable sending mails on localhost

I am trying to send mails from localhost. I followed a tutorial and found online but still cant send the mail. please help!!!

[Paid/Partnership] Kinky Dating Site With Long-Term Plans

Hi! I'm new here, this is my first post. I'm Nookie, and I run a dating site for kinksters originally built on an Oxwall/SkaDate framework and customized.   In seven months, we've grown to 22,000 users, despite bugs, slowne...

Convert SQL Query into Laravel?

SELECT * FROM jobs WHERE published = 1 AND (created_at between '2017-05-12 00:00:00' and '2017-05-13 00:00:00' OR created_at between '2017-05-10 00:00:00' and '2017-05-12 00:00:00' OR created_at between '2017-05-05 00:00...

How To Record Urls Loading on iFrame Into MySql Db ?

Programmer Experts,   I'm embarking on an interesting project to gain work experience in php. Just stuck on one thing and wondering if you can help. You probably used Team Viewer. This is where I create a Team Viewer session and...

How To Add More Than One Entry On A Single Cell/Array Where Each Entry Is Separated By Commas?

Programming buddies, I'm back online after nearly 2wks of offline. Gonna be harassing you guys again and more this time. Eeek! Anyway, right now, I'm trying to build a script that adds multi-entries into the same single cell MySQLsq...

Transaction in SQL

A transaction is used to check whether all SQL statements get executed successfully or not. A Single transaction starts with a particular statement and ends after the completion of all the SQL statements executed successfully. If all SQL statemen...

Locking techniques in Concurrency control in SQL

Concurrency Control when multiple users accessing a same database at the same time, If any change made by any one of the user do not adversely affect work of the other users. Locking technique in concurrency control means use a lock variable wi...

Full Calendar Events From Database

1- Create a mysql Database.   2- Create a Table events inside created database.    CREATE TABLE `events` ( `id` int(10) NOT NULL AUTO_INCREMENT, ...

How to get selected numbers of character from column using Codeigniter?

Hello Readers, If you are using CodeIgniter you want to fetch limited MySQL results then in this blog we will learn how to to this.   Suppose you want only first 200 chars of a field then you should only fetch limited results, this wil...

MySql: Display last conversation between multiple users in Inbox

Retrieve last message between multiple users and display it in inbox   Hello friends today I am going to tell you how to display last conversation in Inbox. For example: In whatsapp chat list we can see the last conversation of each us...

Import excel sheet into database using PHP

Hello friends, This tutorial will help you to insert excel sheet data into the MySQL database using PHP I have also included the snapshots which will help you to understand more clearly.   Import Students: You can import students by cl...

Use of IN operator and BETWEEN operator in MySQL

MySQl IN operator facilitates us to match a column's value against multiple values in one go.   As most of us are aware that we use WHERE clause for giving any condition in SELECT, INSERT, UPDATE, DELETE statements, so whenever we ...

Database of Countries

Hello friends, I was working on the project where I need to import countries database with their country codes. I am providing you the countries database with the help of which you can display list for countries with their country codes on your w...

How to reset AUTO_INCREMENT in MySQL?

Hello friends, I was facing issue in database. I wanted the auto increment should start from 1. There were 20 rows in table. When I deleted all the rows from the table and inserted new row then auto increment started from id = 21 instead of 1....

How to use SQL Min () Function ?

Hi Reader's,   Welcome to FindNerd, today we are going to discuss how to use   SQL Min () Function in Sql. SQL Min () Function is used for getting the minimum value from the selected field. Syntax of SQL Min (): se...

MySQL CONCAT Functions

CONCAT function is mysql plays a vital role. The CONCAT() function combine or concatenate the list of strings together . We have 2 types of concat function -> CONCAT() – This function will concate list of string together without...

Mysql database browsers not working after upgrade

needed version 5.7 of mysql server for a project. I upgraded from version 5.5 to 5.7 using this tutorial. The upgrade was successful and I am able to use the updated version via command line. However, mysql browsers (mysql-workbench as sqlyog as ...

IFNULL Function

The IFNULL( ) function is available in MySQL, and not in SQL Server or Oracle. This function takes two arguments.     If the first argument is not NULL, the function returns the first argument. Otherwise, the second argument is...

MySQL: selecting rows where a column is null

In MySQL, we can select rows where a column is null by using IS NULL operator. We have a table "employee" as below:     employee id first_name salary country ............................................

How to install MySQL on Ubuntu 14.04

How to Install MySQL on Ubuntu: Step 1 - Installing MySQL To install MySQL you need to update the package index on your server and then install the package with apt-get. Write the following commands to install MySQL $ sudo apt-get u...

How to insert values into database in php.

Inserting data to a database would be possible by using SQL statements, specifically the INSERT command. Data can be entered  into the database using insert query into the function, here is simple line of code that will create a database usi...

How to use Left Join

Left Join: Left Join is used to join two tables and it return all rows from table 1 and matching rows from table 2. The result is NULL for unmatched rows for table 2. Left Join keyword is used to apply Left Join on two tables. Syntax for Le...

Truncating a table

TRUNCATE TABLE Statement: TRUNCATE Statement is used to remove all records from a table. It is a Data Definition Language (DDL) Statement as it deletes all records and only structure remains. It is similar to delete statement but without where...

Null Values

Null Values: Null values denotes missing data in a table or a database. If a column does not have any NOT NULL constraint then for that column there can be NULL values. By default a column can have NULL values. We cannot use comparison oper...

Combining Results of two or more SELECT Statements

Combining Results of two or SELECT Statements using UNION OPERATOR: UNION Operator is used to combine the results of two or more SELECT statements. But UNION operator does not return duplicate rows so to return duplicate rows UNION ALL operato...

Sub Queries

Sub Queries: Sub Queries are those query which comes within another query and are written after the WHERE clause.They are also known as Inner query or nested query. It is used to return records that are used in the main query as a conditio...

DELETE Query

DELETE Statement: It is used to delete existing records from a table. It can delete all records from a table if where condition is not given and if where condition is given than it will delete selected records which will meet the condition. ...

Group By Statement

Group By : It is used to group the result-set by one or more column. It is used in conjunction with aggregate functions provided by Structured Query Language . If order by is used then Group By must come before Order By clause. Syntax1: ...

How to show table list in a database in MySQL?

Sometimes we need to find table list present in a database so that we can identify which table we have to create and which one not. To work in a particular database we need to use the below statement first: use database_name; Example: ...

How to show CREATE TABLE syntax in MySQL?

Sometimes we need to check the CREATE TABLE syntax for already created table in the database. When we need to check what kind of columns and what datatype a column has in a table then we require the CREATE TABLE syntax for that table. Syntax ...

How to create a TABLE in MySQL?

To create a table in MySQL, we use the CREATE TABLE statement. A table is a combination of row and columns. CREATE TABLE Syntax CREATE TABLE table_name ( column_name1 data_type(size), column_name2 data_type(size), .... ); In the a...

How to create a DATABASE in MySQL?

To create a database in MySQL, we use the CREATE DATABASE statement. CREATE DATABASE Syntax CREATE DATABASE database_name; CREATE DATABASE Example The below statement will create a database named "demo": CREATE DATABASE demo; ...

How to use of AND & OR operators in MySQL?

Sometimes we need to filter records based on some conditions, for that we use the AND & OR operators in MySQL. AND operator - We use AND operator if we require both conditions in a query means the AND operator displays a record only if bot...

What is the use of LIMIT Clause in MySQL?

In MySQL, the LIMIT Clause is used to return the specified number of records means by using LIMIT we can specify how many records we want to return from a table.. The LIMIT Clause is useful when, we want to select some records from a table whi...

How to get the last record from a table in MySQL?

Sometimes we need to find the last inserted record into table. We can do this by using ORDER by and LIMIT. Syntax: SELECT * FROM table_name ORDER by id DESC LIMIT 1; Example: Suppose we have a table named "tickit" and we want to fi...

What is the use of Aliases in MySQL?

In MySQL, aliases are used to give temporarily name to a table or a column. When we write a query we use Aliases to make column name more readable. Alias Syntax for Columns SELECT column_name AS alias_name FROM table_name; Alias Synta...

What is the use of LIKE Operator in MySQL?

In MySQL, the LIKE operator is used to search for a specified pattern for a column in a WHERE clause . LIKE Syntax SELECT column_name FROM table_name WHERE column_name LIKE pattern; We have a table "employee" as below: employe...

What is the use of UPDATE statement in MySQL?

In MySQL, the UPDATE statement is used to update existing records in a table. UPDATE Syntax UPDATE table_name SET column1=value1,column2=value2,... WHERE some_column=some_value; In the above syntax, WHERE clause specifies which row o...

What is the use of IN Operator in MySQL?

In MySQL, the IN operator is used to allow us specify multiple values in a WHERE clause. IN Operator Syntax SELECT column_name FROM table_name WHERE column_name IN (value1,value2,...); We have a table "employee" as below: empl...

What is the use of BETWEEN Operator in MySQL?

In MySQL, the BETWEEN operator is used to select values (values can be numbers, text, or dates) from a column within a specified range. BETWEEN Syntax SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2; ...

What is the use of ORDER by Keyword in MySQL.

In MySQL, the ORDER by keyword is used to get records from a table in sorted order. The ORDER BY keyword can use one or more columns to sort the result-set. We can sort the records in both ascending and descending order.By default, ORDER by ke...

What is the use of WHERE Clause in MySQL?

In MySQL, the WHERE clause is used to filter records from a table. The WHERE clause is used to get the records that match the specified criteria in that. WHERE Clause Syntax SELECT column_name,column_name FROM table_name WHERE column_name...

Use of SELECT statement in MySQL.

In MySQL, The SELECT statement is used to select data from a table. SELECT Syntax SELECT column_name,column_name FROM table_name; and to select all records SELECT * FROM table_name; We have a table "employee" as below: ...

What is the use of GROUP by statement in MySQL?

The GROUP by statement is used with the aggregate functions to group the result by one or more columns. GROUP by Syntax SELECT column_name, aggregate_function(column_name) FROM table_name WHERE column_name operator value GROUP by column_...
prev 1 3
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: