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

Deleting All Rows in a Table in MySQL
How To Delete All Rows in a Table in MySQL? If you want to delete all rows from a table, you have two options: Use the DELETE statement with no WHERE clause. Use the TRUNCATE TABLE statement. The TRUNCATE statement is more efficient the DELETE statement. The tutorial exercise shows you a good exampl...
2018-01-08, 1376🔥, 0💬

NULL Values Involved in Bitwise Operations in SQL Server
What Happens If NULL Values Are Involved in Bitwise Operations in SQL Server Transact-SQL? If NULL values are involved in bitwise operations, the result will be binary NULL values. The following tutorial script shows you some good examples: SELECT 1 | NULL; GO ----------- NULL SELECT 707 &amp; N...
2017-02-03, 1374🔥, 0💬

Start a New Transaction Explicitly in MySQL
How To Start a New Transaction Explicitly in MySQL? If you are confused on the implicit new transaction rules, you can always start a new transaction with the "START TRANSACTION" command to start a new transaction explicitly. "START TRANSACTION" command works in both "Autocommit On" and "Autocommit ...
2016-10-17, 1374🔥, 0💬

Returning Top 5 Rows in MySQL
How To Return Top 5 Rows in MySQL? If you want the query to return only the first 5 rows, you can use the LIMIT clause, which takes one parameter as the maximum number of rows to return. The following statement returns the first 5 rows from the fyi_links: mysql&gt; SELECT id, url, counts, tag FR...
2017-12-21, 1373🔥, 0💬

Giving Privileges at the Database Level in MySQL
How To Grant User Privileges at the Database Level in MySQL? If you want to grant a user privilege at the database level, you can use the "GRANT privilegeName ON databaseName.* TO userName" command. The argument "databasename.*" in the command stands for all tables in the specified database. The fol...
2017-08-21, 1373🔥, 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, 1372🔥, 0💬

Index - Data Structure for Query Performance in Oracle
What Is an Index in Oracle? Index is an optional structure associated with a table that allow SQL statements to execute more quickly against a table. Just as the index in this manual helps you locate information faster than if there were no index, an Oracle Database index provides a faster access pa...
2019-05-10, 1371🔥, 0💬

Use "mysql" to Run SQL Statements in MySQL
How To Use "mysql" to Run SQL Statements in MySQL? If you want to run SQL statement to your server with "mysql", you need to start "mysql" and enter your SQL statement at the "mysql" prompt. Here is a good tutorial exercise that shows you how to run two SQL statements with "mysql": &gt;cd \mysql...
2018-02-28, 1371🔥, 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, 1371🔥, 0💬

System Databases Used by SQL Servers in SQL Server
What are system databases in SQL Server? System databases are created by the SQL Server itself during the installation process. System databases are used by the SQL server to help manage other user databases and client execution sessions. SQL Server 2005 Express Edition uses 4 system databases: mast...
2016-11-20, 1371🔥, 0💬

Creating a View with Data from Another View in SQL Server
Can You Create a View using Data from Another View in SQL Server? Can You Create a View with Data from Another View? The answer is yes. A view can be used as a table to build other views. The tutorial exercise below shows you how to create a view using data from another view: USE AdventureWorksLT; G...
2016-11-05, 1371🔥, 0💬

Using SELECT Statements with Joins and Subqueries in SQL Server
Where to find answers to frequently asked questions on Using SELECT Statements with Joins and Subqueries in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Using SELECT Statements with Joins and Subqueries in SQL Server. Clear answers ...
2016-10-30, 1371🔥, 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, 1370🔥, 0💬

"DROP SCHEMA" - Dropping an Existing Schema in SQL Server
How To Drop an Existing Schema in SQL Server? If you want to delete a schema, you need to move all objects out of that schema, then use the "DROP SCHEMA" statement to delete the schema. The tutorial exercise below shows you how to drop schema "fyi": -- Login with "sa" USE FyiCenterData; GO -- Drop f...
2016-10-20, 1370🔥, 0💬

What Is SQL Standard in MySQL
What Is SQL Standard in MySQL? SQL, SEQUEL (Structured English Query Language), is a language for RDBMS (Relational Database Management Systems). SQL was developed by IBM Corporation. SQL became an ANSI standard, called SQL-87, in 1986. ISO made a major revision, called SQL-92, in 1992. The latest r...
2018-04-21, 1368🔥, 0💬

CREATE INDEX - Adding an Index on an Existing Table in SQL Server
How To Create an Index on an Existing Table in SQL Server? If you want to an index on an existing table, you can use the CREATE INDEX statement in a simple syntax: CREATE INDEX index_name ON table_name (column_name) The tutorial exercise below shows you how to add an index for the "in" column of the...
2016-11-15, 1368🔥, 0💬

Sorting Query Output by Multiple Columns in SQL Server
Can the Query Output Be Sorted by Multiple Columns in SQL Server? You can specifying multiple columns in the ORDER BY clause as shown in the following example statement, which returns rows sorted by "tag" and "counts" values: SELECT tag, counts, url, created FROM fyi_links ORDER BY tag, counts GO ta...
2016-10-26, 1368🔥, 0💬

Create Tables for ODBC Connection Testing in Oracle
How To Create Tables for ODBC Connection Testing in Oracle? If you want to follow the tutorial exercises in the sections below, you need to create a user account and a table for ODBC connection testing as shown here: SQL&gt; CONNECT system/retneciyf Connected. SQL&gt; CREATE USER fyi IDENTIF...
2016-10-15, 1367🔥, 0💬

What Is a Table in SQL Server
What is a table in SQL Server? A table in database is a data object used to store data. Tables have the following features: Data is stored in a table with a structure of rows and columns. Columns must be pre-defined with names, types and constrains. A table object may have other associated data obje...
2016-11-20, 1366🔥, 0💬

NULL Values Involved in Datetime Operations in SQL Server
What Happens If NULL Values Are Involved in Datetime Operations in SQL Server Transact-SQL? If NULL values are involved in datetime operations, the result will be datetime NULL values. The following tutorial script shows you some good examples: USE FyiCenterData; GO SELECT GETDATE()+NULL; GO -------...
2017-02-05, 1365🔥, 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, 1365🔥, 0💬

Creating a New Table in MySQL
How To Create a New Table in MySQL? If you want to create a table, you can run the CREATE TABLE statement as shown in the following sample script: &lt;?php include "mysql_connection.php"; $sql = "CREATE TABLE fyi_links (" . " id INTEGER NOT NULL" . ", url VARCHAR(80) NOT NULL" . ", notes VARCHAR...
2017-10-08, 1364🔥, 0💬

Testing DML Triggers in SQL Server
How To Test a DML Trigger in SQL Server? To test a DML trigger defined on a table, you just need to execute several INSERT, UPDATE and DELETE statements on that table as shown in this tutorial example: USE FyiCenterData; GO INSERT INTO fyi_users (name) VALUES ('FYI Admin'); GO Records are inserted, ...
2016-10-25, 1364🔥, 0💬

Commit the Current Transaction in MySQL
How To Commit the Current Transaction in MySQL? If you have used some DML statements updated some data objects, and you want to have the updates to be permanently recorded in the database, you can use the COMMIT command. It will make all the database changes made in the current transaction become pe...
2016-10-17, 1364🔥, 0💬

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