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

How to Create a Simple Admin Page in HTML?

At first i'm a beginner and i have a simple project to do.   I'm trying to build a simple admin page that add some content to my website   This is not a big deal, but i need someone who can instruct my directly ...

Is It Possible to Put all Upcoming to Mobirise eMail to Separate Database?

I receive a huge amount of messages from my landing page, created in Mobirise website builder. It's a mess.   I want to put them in a separate database, so I could see them in an order. Is it possible? I didn't find an answer i...

How to Summarise Leave Time Proportionally and Correctly in MySql

In mysql database i created "leave" table:   CREATE TABLE `leave` ( `ID_LEAVE` int(11) NOT NULL, `ID_WORKER` int(11) NOT NULL, `BEGIN_DATE` datetime DEFAULT NULL, `END_DATE` datetime DEFAULT NULL ) INSERT INTO `lea...

How to Merge Two Tables on Coded Columns Using Python

 Hi guys!   I have two tables and I need to merge these two tables on columns left_on='A', right_on='B'. The problem is that 'A' column is coded 'B' column.   What would be the best optio...

How to Merge XML CTE's in SQL Server Using Common Refid Key

I have the following CTE's, and I'm trying to combine XML1 and XML2 CTE's in Sql Server by their common refid key. ;With TBL1_Fruits As (Select '1' as refid, 'Apples' as fruits, 'Red' a...

How to Insert Data Contained in Entry Widgets on a GUI Correctly into SQL DB Created in Python?

In the code below the str entry widgets that I use the get method to retrieve data from, have been created earlier in the code.   I have tried the following ways to solve the problem: turning the list into a tuple using a list ...

Why am I getting null values for lease_id in Rent?

Passing primary key values in the parent table to foreign key values in child table with parent insert and child insert being in separate stored procedures.   Parent is Lease table, the child is Rent table. I am getting null value...

Looking for SQL, NodeJs and PHP Programmers to join Our Startup

We are looking for programmers that know SQL, NodeJs and PHP, as well as web designers, to join our startup. Requirements: - Applicants must be able to take initiative when it is needed - Applicants must be creative  - ...

How to insert this codes data to SQLite?

Need help in inserting the below code packet to SQLite: public class StepDetector { private static final int ACCEL_RING_SIZE = 50; private static final int VEL_RING_SIZE = 10; // change this threshold according to your sen...

java problem

  what is the problem here?please help me package help; import java.util.Date; import java.sql.*; import java.util.logging.Level; import java.util.logging.Logger; public class Help { public static void main(String[] args)...

Cursor in SQL Server

A cursor is a database object that can be created at runtime. It is used to get data  from a result set line by line(or row by row) rather than executing  all the rows in the result set at a single time like an SQL-transaction. Generall...

SQL Server : How to find a stored procedure containing specific text

Many times during SQL server development we need to search for a stored procedure containing a specific text. This helps in checking for dependencies for objects in stored procedures or sometimes we might be simply interested in searching for a h...

Pagination stored procedure in SQL Server

In this blog we illustrate how to get the pagination data from SQL server stored procedure. To create a such type of a stored procedure, we need to send a minimum three parameters(startRowIndex, pageSize, totalCount).     1. ...

Triggers in the SQL server

A trigger is a unique store procedure that is executes to give a response to particular action on the table of a database using  the following SQL statements: 1. Data Manipulation Language (DML) SQL Statements (like INSERT, UPDATE or DE...

SQL Server : List all trigger associated with a table with SQL Server

During management of SQL server database many  times  we need to get list all triggers in SQL Server database with table name and table's schema . Following query can be used to get the desired result. SELECT sysobjects....

Difference between TRUNCATE, DELETE commands

TRUNCATE:       Truncate command will remove all the rows from a table, there will be no WHERE clause in TRUNCATE command and there will be no data in the table after we run the truncate command.     ...

How to use IN keyword in LINQ

In SQL Server, we are very familiar with IN keyword and we use this keyword in many times which is very helpful for us. It save our extra efforts and code line like below query.     To achieve this in LINQ , we heve below t...

images from database to jtable. Java

I have an app that contains a database using java sql, and has a jTable that displays the database info. It works fine, EXCEPT for when I am trying to store and display images to one of the columns. I used the  jTable1.setModel(DbUtils.resul...

Getting Foreign Key Constraint Fails Data Insertion Error in MySQL

I am trying to create to 2 tables and inserting data into them but I am getting this error Creating Athlete the table failed SQLSTATE[23000]: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fail...

SQL Injection

SQL Injection Security of any Application plays a major role for any developer. Some of the users try to break the security of any application for their fun, for stealing the data .They use different methods to break the security and SQL Injec...

Different Types of SQL Keys

SQL Keys play a very important role in database related task in SQL like retrieve data/record from the table according to the requirement.  A key can be defined as a single or combination of multiple fields/columns in a table. With the help ...

SQL Inbuilt Functions

Hi Readers, In this blog, we will discuss the inbuilt functions of SQL which are used to perform calculations on data. All inbuilt functions are provided to make the task easier to do and we can easily complete a complex task with the help...

Best practices for error handling and logging

In this blog I have summarized the best practices for error handling and logging. 1) Appropriate use of try/catch. 2) Log sufficient contextual information. All exceptions are logged(with userid , page or proc name, timestamps ,inner except...

SQL Server : Best Practices

Following is a list of best practices for SQL Server 1) Use correct formatting    Following is a sample select query for reference:             SELECT X.column...

Except Clause in SQL

Except Clause: It combines two select statements and return tuples from first SELECT statement which are not returned by second SELECT statement. It is used to achieve Distinct and Not In queries operation in a single clause(Except). S...

Difference between reset and drop in rails

We often use rake db:reset command for recreating the database, instead of conventional 3-steps for doing the same. rake db:drop (dropping the Database, wipe away all your data) rake db:create (Create the Database) rake db:migrate (Runs...

How to insert value in an auto incremented column in SQL

How to insert value in an auto incremented column in SQL Sometimes we have situation to insert value in an auto incremented column. Let's discuss this with a simple example. Example 1) Here is my table structure. CREATE TABLE St...

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...

How to update increment value in a table without loop in SQL

Hi All, Some time we need to update value in a table in some pattern or increment order. Then we use loop and iterate with all record, but as know looping is take time and our application become slower. We can achieve this by without loop a...

How to use Sql Avg () Function ?

Hi Reader's,   Welcome to FindNerd, today we are going to discuss how to use  Sql Avg () Function in Sql  ? So, basically this function is used for returning the average of numeric column.If in a table there is null value t...

How to use SQL Max () Function ?

Hi Reader's,   Welcome to FindNerd, today we are going to discuss how to use  SQL Max ( ) Function in Sql ?    Basically, SQL Max () Function is used to get the maximum value from the selected field.   &nb...

INTERSECT Clause

INTERSECT Clause: It works similar like union clause as it is used to combine two SELECT statements, but it returns  tuples only from first SELECT statement which are common to tuples in the second SELECT statement. Syntax: S...

How to trace SQL query or SP on a page

HI Guys, Some times we want to know that what SQL operation is running on a particular page or a event, then we have to debug our code base and we get the result, but it's time taking process to debug code line by line and as well as some ...

How to limit data in MYSQL

The LIMIT clause in MySQL helps to get multi pages results or pagination through SQL Databases. This LIMIT clause is very useful on large tables its because returning the large numbers of records through MYSQL will be difficult to read and analyz...

Subquery

A subquery is a query within a query embedded within where clause It is used to return the data that will be used in the main query as a condition to the data that is retrieved. SELECT, INSERT, UPDATE, and DELETE statements along with the o...

DECODE function

DECODE function: DECODE function works similar to if-else statement or case statement. DECODE compares expression to each search value one by one and returns the result of that search which is equal to the expression. If there is no match than...

Check Constraint

Check Constraint: It is used to restrict the range of values that can be inserted in a column. If a column contain check constraint then only a particular range of values can be inserted in that column. Example: CREATE TABLE Employee( ...

Query Languages

  1. QUEL It is the query language in the system INGRES. It is based on relational calculus. The fundamental aspect of the query languages based on the relational calculus is tuple variable ( which is a variable that "ranges over&...

Adding multiple rows with a single Insert Statement

INSERT ALL Statement: With the help of INSERT ALL statement we can add multiple rows with a single INSERT statement. We can use this statement to insert multiple rows in one or more than one tables. It eliminates the need of writing insert sta...

Difference between DELETE and TRUNCATE commands?

Delete command in SQL removes the ROW based on the condition provided with the WHERE clause, if no WHERE clause is provided it deletes all the row from the table. Syntax for delete command: DELETE FROM table_name WHERE column_name='value'...

How to select second highest salary from a table?

This question is asked a lot in interviews, so here some of the methods by which one can get the second highest salary of an employee from a table. Suppose the Employee is like this ID Name Salary Table: Employe...

Temporary tables

MySQL Temporary tables: A temporary table allows a user to store temporary records and we can use these records several times until the session does not expire. They are useful in those situations when it is expensive to write a query havin...

EXISTS Operator

EXISTS Operator: Exists operator is a special type of operator which is used in a subquery. It is used to check whether a subquery returns something or not. If a subquery returns some row then outer query get executed otherwise the whole query...

SELECT INTO Statement

SELECT INTO Statement: SELECT INTO statement is used to copy data from one table into another table. We can provide a condition while using SELECT INTO statement. Syntax: SELECT columnname(s) INTO new_tablename FROM t...

NOT operator in SQL

NOT Operator: The SQL NOT operator is used to reverse a condition in a SQL query. It is used with SELECT, DELETE, UPDATE, or INSERT statement. It can be used with other operators like BETWEEN, IN , EXISTS but it will reverse the condition. ...

BETWEEN and NOT BETWEEN Operator

BETWEEN Operator: It is used to fetch values which lies within a range given in BETWEEN operator. Syntax: SELECT columnname(s) FROM tablename WHERE columnname BETWEEN value1 AND value2; Example: SELECT * FROM Employee WHERE ...

Case Expression in SQL

Case Statement: Case Statement is used to provide IF-ELSE functionality in a SQL query to fetch result. We provide multiple conditions and according to condition matches the value will change for that that column value. Syntax: SELECT ...

SQL COMMANDS

SQL is Structure Query Language which is developed by E.F.Codd.Today almost all Relational Database Management Systems (RDBMS) uses SQL as the standard database language. We can use it to do different types of operations in RDBMS. SQL COMMAND...

Use of AVG() Function in MySql

The MySql provides us with various for wide use for handling the database. The AVG() function is also one of the important function used in MySql. The AVG() is used to calculate the average value of the columns. Syntax: SELECT AVG(column-n...
prev 1 3 4
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: