<< < 40 41 42 43 44 45 46 47 48 49 50 > >>   ∑:1328  Sort:Date

Testing Table for SELECT Statements in SQL Server
How To Create a Testing Table with Test Data to try with SELECT statements in SQL Server? If you want to follow the tutorial exercises presented in this collection, you need to create a testing table and insert some test data, as shown in the following sample script: CREATE TABLE fyi_links (id INTEG...
2016-10-26, 1589🔥, 0💬

Inserting Data into an Existing Table in MySQL
How To Insert Data into an Existing Table in MySQL? If you want to insert a row of data into an existing table, you can use the INSERT INTO statement as shown in the following sample script: &lt;?php include "mysql_connection.php"; $sql = "INSERT INTO fyi_links (id, url) VALUES (" . " 101, 'dev....
2017-10-08, 1588🔥, 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, 1588🔥, 0💬

Writing Date and Time Literals in MySQL
How To Write Date and Time Literals in MySQL? MySQL offers a number of formats for you to use to enter date and time literals: ANSI standard format: "YYYY-MM-DD HH:MM:SS". Non-standard limiters. Like: "YYYY/MM/DD HH^MM^SS" or "YYYY.MM.DD HH-MM-SS". No limiters. Like: "YYYYMMDD" for a date or "HHMMSS...
2017-12-26, 1587🔥, 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, 1587🔥, 0💬

"DROP DATABASE" - Deleting Databases in SQL Server
How to delete a database in SQL Server? If you created a database incorrectly, or you have a database that is not needed any more, you can delete it with the "DROP DATABASE" statement with this syntax: DROP DATABASE database_name For example, execute this statement: DROP DATABASE FyiCenterData GO Th...
2016-11-24, 1586🔥, 0💬

Adding a New Index to a Large Table in SQL Server
What Happens If You Add a New Index to Large Table in SQL Server? An index can be added when you create a new table. New rows will be indexed as they are inserted into the table. But you can also add a new index to an existing table with the same CREATE INDEX statement. The existing rows will be ind...
2016-11-13, 1586🔥, 0💬

Defining and Using Table Alias Names in SQL Server
How To Define and Use Table Alias Names in SQL Server? When column names need to be prefixed with table names, you can define table alias name and use them to prefix column names. To define an alias for a table name, just enter the alias name right after the original table name in the FROM clause as...
2016-10-30, 1586🔥, 0💬

Defragmenting Table Indexes in SQL Server
How To Defragment Table Indexes in SQL Server? When a table index is fragmented to a certain percentage, you need to defragment the index to maintain its performance level. There are 3 ways to defragment: 1. "ALTER INDEX index_name ON table_name REORGANIZE" - Defragmenting the specified index perfor...
2016-11-08, 1583🔥, 0💬

Using Multiple Columns in the GROUP BY Clause in SQL Server
Can Multiple Columns Be Used in GROUP BY in SQL Server? If you want to break your output into smaller groups, you can specify multiple column names or expressions in the GROUP BY clause. Output in each group must satisfy a specific combination of the expressions listed in the GROUP BY clause. The mo...
2016-10-25, 1583🔥, 0💬

Types of Table Joins in MySQL
How To Join Two Tables in a Single Query in MySQL? Two tables can be joined together in a query in 4 ways: Inner Join: Returns only rows from both tables that satisfy the join condition. Left Outer Join: Returns rows from both tables that satisfy the join condition, and the rest of rows from the fir...
2017-12-31, 1582🔥, 0💬

How Data Locks Are Respected in Oracle
How Data Locks Are Respected in Oracle? Here are the rules on how data locks are respected: All statements ignore data locks owned its own transaction. SELECT query statements ignores data locks owned by any transactions. INSERT, UPDATE, and DELETE statements in a READ COMMITTED transaction will wai...
2019-08-08, 1581🔥, 0💬

Drop an Existing View in MySQL
How To Drop an Existing View in MySQL? If you have an existing view, and you don't want it anymore, you can delete it by using the "DROP VIEW viewName" statement as shown in the following script: mysql&gt; DROP VIEW faqComment; Query OK, 0 rows affected (0.00 sec) mysql&gt; SELECT * FROM faq...
2018-01-24, 1581🔥, 0💬

UNION - Merging Outputs from Two Queries Together in SQL Server
How To Use UNION to Merge Outputs from Two Queries Together in SQL Server? If you have two queries that returns the same row fields, you can merge their outputs together with the UNION operator. The following tutorial exercise shows you how to use the UNION operator: SELECT * FROM fyi_links WHERE ta...
2016-10-26, 1580🔥, 0💬

Build Data Dictionary View in Oracle
How To Build Data Dictionary View of an New Database in Oracle? This is Step 9. The Oracle Administrator Guide suggests to run two SQL scripts provided by Oracle as shown bellow: SQL&gt; @/u01/oracle/rdbms/admin/catal og.sqlSQL&gt; @/u01/oracle/rdbms/admin/catpr oc.sql  ⇒ Introduction to Ora...
2019-03-27, 1579🔥, 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, 1579🔥, 0💬

Predefined User Accounts in MySQL
What Are the Predefined User Accounts in MySQL? There is only one predefined user account called "root": "root" was created during the installation process. "root" has no password initially. You need to assign a new password as soon as you finishes the installation. "root" has all access privileges ...
2017-09-08, 1579🔥, 0💬

IN - Testing Value in a Value List in SQL Server
What To Test Value Lists with the IN Operator in SQL Server Transact-SQL? Sometimes you want to test a given value against a list of values. You can do this in a loop with the regular "equal" operator. But you can also use the special comparison operator IN to get it done with the following syntaxes...
2017-01-21, 1577🔥, 0💬

Sorting Query Output with ORDER BY Clauses in SQL Server
How To Sort the Query Output with ORDER BY Clauses in SQL Server? If you want the returning rows to be sorted, you can specify a sorting expression in the ORDER BY clause. The simplest sort expression is column name who's values will be sorted by. The following select statement returns rows sorted b...
2016-10-26, 1577🔥, 0💬

odbc_prepare() - Creating Prepared Statements
How To Create Prepared Statements using odbc_prepare()? If you have a SQL statement that need to executed repeatedly many times with small changes, you can create a prepared statement object with parameters so it can be executed more efficiently. There are two functions you need to use prepare and e...
2024-06-03, 1576🔥, 0💬

Entering Numeric Values in MySQL
How To Include Numeric Values in SQL statements in MySQL? If you want to include a numeric value in your SQL statement, you can enter it directly as shown in the following examples: SELECT 255 FROM DUAL; -- An integer 255 SELECT -6.34 FROM DUAL; -- A regular number -6.34 SELECT -32032.6809e+10 FROM ...
2018-03-31, 1576🔥, 0💬

"INSERTED" - New Record of an DML Event Instance in SQL Server
How To Access the Inserted Record of an Event in SQL Server? When a DML event occurs, SQL Server will prepare a temporary table called "INSERTED", which contains the new record of the affected row, which is: A copy of the inserted row for an INSERT statement. A copy of the updated row for an UPDATE ...
2016-10-24, 1576🔥, 0💬

Returning the Second 5 Rows from a Query in SQL Server
How To Return the Second 5 Rows in SQL Server? If you want to display query output in multiple pages with 5 rows per page, and the visitor wants to see the output for the second page, you need to display query output from row 6 to row 10. If you are using MySQL server, you can use the "LIMIT startRo...
2016-10-29, 1575🔥, 0💬

Using Subqueries in the FROM Clause in SQL Server
How To Use Subqueries in the FROM Clause in SQL Server? If you have a query returning many rows of data, and you want to perform another query on those rows, you can put the first query as a subquery in the FROM clause of the second query. A subquery used in this way become a temporary table, and yo...
2016-10-29, 1575🔥, 0💬

<< < 40 41 42 43 44 45 46 47 48 49 50 > >>   ∑:1328  Sort:Date