<< < 37 38 39 40 41 42 43 44 45 46 47 > >>   ∑:1243  Sort:Date

Creating an Index for Multiple Columns in SQL Server
How To Create an Index for Multiple Columns in SQL Server? An index for multiple columns works similarly to a sorting process on multiple columns. If an index is defined for two columns, the index key is composed by values from those two columns. A multi-column index will be used to speed up the sea...
2016-11-13, 1408🔥, 0💬

Assign Data from a Deleted Row to Variables in Oracle
How To Assign Data of the Deleted Row to Variables in Oracle? If a DELETE statement is deleting a single row, you can assign column values of the deleted row to variables by using the RETURNING clause, which an extension of DELETE statements for PL/SQL. The tutorial script shows you how to do this: ...
2018-09-13, 1407🔥, 0💬

Apply Filtering Criteria at Group Level in MySQL
How To Apply Filtering Criteria at Group Level in MySQL? If you want to return only specific groups from the query, you can apply filtering criteria at the group level by using the HAVING clause inside the GROUP BY clause. Note group functions can also be used in HAVING conditions. The following tut...
2017-10-16, 1407🔥, 0💬

Using Subqueries with the EXISTS Operator in MySQL
How To Use Subqueries with the EXISTS Operator in MySQL? A subquery can be used with the EXISTS operator as "EXISTS (subquery)", which returns true if the subquery returns one or more rows. The following statement is a good example of "EXISTS (subquery)". It returns rows from fyi_links table that th...
2017-09-17, 1407🔥, 0💬

Data Removed in MEMORY Tables in MySQL
What Happens to MEMORY Tables When MySQL Server Is Stopped in MySQL? If you have data rows stored in a table with the MEMORY storage engine, and the MySQL server has been shut down by the DBA, all data rows will be removed. But the table structure will remain in the server. The tutorial exercise bel...
2017-08-08, 1407🔥, 0💬

Query with a Right Outer Join in MySQL
How To Write a Query with a Right Outer Join in MySQL? If you want to query from two tables with a right outer join, you can use the RIGHT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a right outer join from two tables: fyi_links and fyi_rates. The join condit...
2017-09-28, 1405🔥, 0💬

CREATE CLUSTERED INDEX - Adding Clustered Indexes in SQL Server
How To Create a Clustered Index in SQL Server? If there is no primary key in a table, you can add one clustered index to that table with CREATE CLUSTERED INDEX statement. The tutorial exercise below shows you how to create a clustered index: USE FyiCenterData; GO -- Drop the old table, if needed DRO...
2016-11-13, 1405🔥, 0💬

Show the Current Transaction Mode in MySQL
How To Find Out the Current Transaction Mode in MySQL? If you are not sure about your current transaction mode, you can use the "SELECT @@AUTOCOMMIT FROM DUAL" statement to find out as shown in the following tutorial exercise: &gt;\mysql\bin\mysql -u dev -piyf fyi mysql&gt; SELECT @@AUTOCOMM...
2016-10-17, 1405🔥, 0💬

UPDATE Subquery Returning No Rows in SQL Server
What Happens If the UPDATE Subquery Returns No Rows in SQL Server? If you use a subquery to assign new values in the SET clause in an UPDATE statement, and the subquery returns no rows for an outer row, SQL Server will provide a NULL value to the SET clause. The tutorial exercise below shows you a g...
2016-11-02, 1404🔥, 0💬

Retrieve Field Values from RECORD Variables in Oracle
How To Retrieve Values from Data Fields in RECORD Variables in Oracle? If a variable is a RECORD variable with data fields assigned values, you can retrieve those values out of its data fields by using fields names prefixed with variable name as "variable.field_name". Here is a sample script showing...
2018-09-01, 1403🔥, 0💬

Converting Dates to Character Strings in MySQL
How To Convert Dates to Character Strings in MySQL? You can convert dates to character strings using the DATE_FORMAT(date, format) function. MySQL supports the following basic formatting codes: %a Abbreviated weekday name (Sun..Sat) %b Abbreviated month name (Jan..Dec) %c Month, numeric (0..12) %D D...
2017-12-26, 1403🔥, 0💬

"RETURNS TABLE" - Creating Inline Table-Value Functions in SQL Server
How To Create an Inline Table-Valued Function in SQL Server Transact-SQL? To create an inline table-valued function, you need to use the "RETURNS TABLE" clause in the "CREATE FUNCTION" statement. There should be no function body, except for a RETURN statement with a SELECT subquery: An inline table-...
2016-12-18, 1403🔥, 0💬

Query Output Sorted by Multiple Columns in Oracle
Can the Query Output Be Sorted by Multiple Columns in Oracle? You can specifying multiple columns in the ORDER BY clause as shown in the following example statement, which returns employees' salaries sorted by department and salary value: SQL&gt; SELECT department_id, first_name, last_name, sala...
2019-12-19, 1402🔥, 0💬

Performing Comparison on Character Strings in SQL Server
How To Perform Comparison on Character Strings in SQL Server Transact-SQL? Comparison operations on character strings are performed based on the associated collation. Each collation defines rules on how characters are ordered, how character cases and accents are treated, etc. The tutorial exercise b...
2017-01-21, 1402🔥, 0💬

UNIQUE Constraint Creating Default Index in SQL Server
Does the UNIQUE Constraint Create an Index in SQL Server? If you add the UNIQUE constraint on a column, SQL Server will automatically add a non-clustered index for that column. The tutorial exercise below shows you the index created as part of the UNIQUE column, "id", of "fyi_links": USE FyiCenterDa...
2016-11-13, 1402🔥, 0💬

Triggers with Multiple Affected Rows in SQL Server
What Happens to a Trigger with Multiple Affected Rows in SQL Server? If there is only one row affected by a DML statement, we know that the DML trigger will be executed once. But how many times the DML trigger will be executed if the DML statement resulted multiple affected rows? The answer is still...
2016-10-24, 1402🔥, 0💬

Execute SQL Statements in MySQL
How To Execute a SQL Statement in MySQL? You can run any types of SQL statements through the mysql_query() function. It takes the SQL statement as a string and returns different types of data depending on the SQL statement type and execution status: Returning FALSE, if the execution failed. Returnin...
2017-10-23, 1401🔥, 0💬

Query with a Left Outer Join in MySQL
How To Write a Query with a Left Outer Join in MySQL? If you want to query from two tables with a left outer join, you can use the LEFT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a left outer join from two tables: fyi_links and fyi_rates. The join condition ...
2017-09-28, 1400🔥, 0💬

Using ORDER BY with UNION Operators in SQL Server
How To Use ORDER BY with UNION Operators in SQL Server? If you need to sort the output from two queries grouped together with a UNION operator, you need to apply the ORDER BY clause at the group level, not at the subquery level. Note that SQL Server and MySQL react differently to the ORDER BY clause...
2016-10-26, 1400🔥, 0💬

Specify Default Values in INSERT Statements in Oracle
How To Specify Default Values in INSERT Statement in Oracle? If a column is defined with a default value in a table, you can use the key word DEFAULT in the INSERT statement to take the default value for that column. The following tutorial exercise gives a good example: INSERT INTO fyi_links VALUES ...
2020-01-29, 1398🔥, 0💬

Create a Single Index for Multiple Columns in Oracle
How To Create a Single Index for Multiple Columns in Oracle? If you know a group of multiple columns will be always used together as search criteria, you should create a single index for that group of columns with the "ON table_name(col1, col2, ...)" clause. Here is an example of one index for two c...
2019-04-17, 1398🔥, 0💬

Deleting Existing Rows in MySQL
How To Delete Existing Rows in a Table in MySQL? If you want to remove a row from a table, you can use the DELETE statement with a WHERE clause to identify the row. The following sample script deletes one row: &lt;?php include "mysql_connection.php"; $sql = "DELETE FROM fyi_links WHERE id = 1102...
2017-06-28, 1398🔥, 0💬

Types of Execution Flow Control Statements in Oracle
What Are the Execution Control Statements in Oracle? PL/SQL supports three groups of execution control statements: IF Statements - Conditionally executes a block of statements. CASE Statements - Selectively executes a block of statements. LOOP Statements - Repeatedly executes a block of statements. ...
2018-11-17, 1397🔥, 0💬

Drop an Existing Table in MySQL
How To Drop an Existing Table in MySQL? If you want to delete an existing table and its data rows, you can use the "DROP TABLE" statement as shown in the tutorial script below: mysql&gt; SELECT * FROM tipBackup; +----+-------------+---------- ---------------+-------------+| id | subject | descri...
2018-02-14, 1396🔥, 0💬

<< < 37 38 39 40 41 42 43 44 45 46 47 > >>   ∑:1243  Sort:Date