Saturday , 30 May 2020
Stackode
Home > Tag Archives: MYSQL Develope

Tag Archives: MYSQL Develope

Create Table – SQL

Create Table – SQL involves naming the table and defining its columns and each column’s data type. The SQL CREATE TABLE statement is used to create a new table. Syntax: Basic syntax of CREATE TABLE statement is as follows: CREATE TABLE table_name( column1 datatype, column2 datatype, column3 datatype, ..... columnN datatype, PRIMARY KEY( one or more columns ) ); CREATE ...

Read More »

UNIONS CLAUSE – SQL

UNIONS CLAUSE – SQL is used to combine the results of two or more SELECT statements without returning any duplicate rows. To use UNION, each SELECT must have the same number of columns selected, the same number of column expressions, the same data type, and have them in the same order, but they do not have to be the same ...

Read More »

Injection SQL

Injection SQL – If you take user input through a webpage and insert it into a SQL database, there’s a chance that you have left yourself wide open for a security issue known as SQL Injection. This lesson will teach you how to help prevent this from happening and help you secure your scripts and SQL statements in your server ...

Read More »

Drop or Delete Table – SQL

Drop or Delete Table – SQL statement is used to remove a table definition and all data, indexes, triggers, constraints, and permission specifications for that table. NOTE: You have to be careful while using this command because once a table is deleted then all the information available in the table would also be lost forever. Syntax: Basic syntax of DROP ...

Read More »

NULL Values – SQL

NULL Values – SQL is the term used to represent a missing value. A NULL value in a table is a value in a field that appears to be blank. A field with a NULL value is a field with no value. It is very important to understand that a NULL value is different than a zero value or a field ...

Read More »

Useful Functions SQL

Useful Functions SQL has many built-in functions for performing processing on string or numeric data. Following is the list of all useful SQL built-in functions: SQL COUNT Function – The SQL COUNT aggregate function is used to count the number of rows in a database table. SQL MAX Function – The SQL MAX aggregate function allows us to select the ...

Read More »

Insert Query Into Table – SQL

Insert Query Into Table – SQL Statement is used to add new rows of data to a table in the database. Syntax: There are two basic syntaxes of INSERT INTO statement as follows: INSERT INTO TABLE_NAME (column1, column2, column3,...columnN)] VALUES (value1, value2, value3,...valueN); Here, column1, column2,…columnN are the names of the columns in the table into which you want to ...

Read More »

Alias Syntax – SQL

Alias Syntax – SQL — You can rename a table or a column temporarily by giving another name known as alias. The use of table aliases means to rename a table in a particular SQL statement. The renaming is a temporary change and the actual table name does not change in the database. The column aliases are used to rename ...

Read More »

COUNT Function SQL

COUNT Function SQL is the simplest function and very useful in counting the number of records, which are expected to be returned by a SELECT statement. To understand COUNT function, consider an employee_tbl table, which is having the following records: SQL> SELECT * FROM employee_tbl; +------+------+------------+--------------------+ | id | name | work_date | daily_typing_pages | +------+------+------------+--------------------+ | 1 | John ...

Read More »

Select Query – SQL

Select Query – SQL statement is used to fetch the data from a database table which returns data in the form of result table. These result tables are called result-sets. Syntax: The basic syntax of SELECT statement is as follows: SELECT column1, column2, columnN FROM table_name; Here, column1, column2…are the fields of a table whose values you want to fetch. ...

Read More »