<< < 44 45 46 47 48 49 50 51 52 53 54 > >>   ∑:1328  Sort:Date

Filtering Out Duplications in the Returning Rows in SQL Server
How To Filter Out Duplications in the Returning Rows in SQL Server? If there are duplications in the returning rows, and you want to remove the duplications, you can use the keyword DISTINCT in the SELECT clause. The DISTINCT applies to the combination of all data fields specified in the SELECT clau...
2016-10-26, 1494🔥, 0💬

Rename an Existing User Account in MySQL
How To Rename an Existing User Account Name in MySQL? If you want to change the name of an existing user account, you can use the "RENAME USER oldName TO newName" command. The tutorial exercise below shows you how to do this: &gt;cd \mysql\bin &gt;mysql -u root -pretneciyf mysql mysql&gt...
2017-12-13, 1493🔥, 0💬

Defining the Name and Server for a new DSN
How To Define the Name and Server for a new DSN? Continuing from the previous tutorial, on the first screen of the "Create a New Data Source to SQL Server" wizard, you should enter 3 fields: Name, Description, and Server as suggested below: Name: FYI_SQL_SERVER Description: FYIcenter.com SQL Server ...
2024-08-06, 1492🔥, 0💬

PHP ODBC - odbc_fetch_array() - Looping through Returning Rows
PHP ODBC - How To Loop through Returning Rows? The best way to query tables and loop through returning rows is to run a SELECT statement with the odbc_exec() function, catch the returning object as a result set, and loop through the result with odbc_fetch_array() function in a while loop as shown in...
2024-05-29, 1492🔥, 0💬

PHP ODBC - Returning Result Set Objects
PHP ODBC - What Is a Result Set Object Returned by odbc_exec()? A result set object is a logical representation of data rows returned by odbc_exec() function on SELECT statements. Every result set object has an internal pointer used to identify the current row in the result set. Once you get a resul...
2024-05-29, 1492🔥, 0💬

List All Tables with "mysql" Command in MySQL
How To Show All Tables with "mysql" in MySQL? If you want to see all the tables in a database, you run the non-SQL command "SHOW TABLES" at the "mysql" prompt. See the following tutorial exercise for example: &gt;cd \mysql\bin &gt;mysql -u root test Welcome to the MySQL monitor. Commands end...
2018-02-28, 1491🔥, 0💬

What Is a SELECT Query Statement in MySQL
What Is a SELECT Query Statement in MySQL? The SELECT statement is also called the query statement. It is the most frequently used SQL statement in any database application. A SELECT statement allows you to retrieve data from one or more tables or views, with different selection criteria, grouping c...
2017-11-05, 1490🔥, 0💬

Sort by Multiple Columns in MySQL
Can the Query Output Be Sorted by Multiple Columns in MySQL? 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: mysql&gt; SELECT tag, counts, url, DATE(created) FROM fyi_...
2017-11-02, 1490🔥, 0💬

DROP VIEW - Deleting Existing Views in SQL Server
How To Drop Existing Views from a Database in SQL Server? If you don't need a specific view any more, you can use the DROP VIEW statement to delete it from the database. The following tutorial exercise shows you how to delete the view, fyi_links_view: USE FyiCenterData; GO SELECT * FROM sys.views; G...
2016-11-05, 1489🔥, 0💬

PHP ODBC - Computing Date and Time Differences
PHP ODBC - How To Display a Past Time in Days, Hours and Minutes? You have seen a lots of Websites are displaying past times in days, hours and minutes. If you want to do this yourself, you can use the DATEDIFF() SQL function The following tutorial exercise shows you how to use DATEDIFF() to present...
2024-05-05, 1488🔥, 0💬

Creating a New Database in MySQL
How To Create a New Database in MySQL? A database in a MySQL server is a logical container used to group tables and other data objects together as a unit. If you are the administrator of the server, you can create a new databases using the CREATE DATABASE statements with MySQL client interface progr...
2017-11-11, 1488🔥, 0💬

Adding More Data to the Test Table in MySQL
How To Add More Data to the Testing Table in MySQL? If you want to continue with other tutorial exercises in this FAQ collection, you need to add more data to the testing table. Follow the script below to add a new column and: mysql&gt; ALTER TABLE fyi_links ADD COLUMN tag VARCHAR(8); mysql&...
2017-11-02, 1488🔥, 0💬

Inserting Data into a View in SQL Server
Can You Insert Data into a View in SQL Server? Can you insert data into a view? The answer is no. But if the question is "Can you insert data into the underlying table through view?" The answer is then yes. SQL Server will allow you to insert data into the underlying table through a view with a cond...
2016-11-04, 1488🔥, 0💬

"DELETED" - Old Record of an DML Event Instance in SQL Server
How To Access the Deleted Record of an Event in SQL Server? When a DML event occurs, SQL Server will prepare a temporary table called "DELETED", which contains the old record of the affected row, which is: A copy of the deleted row for a DELETE statement. A copy of the row to be updated for an UPDAT...
2016-10-24, 1487🔥, 0💬

Creating a New Table in a Given Schema in SQL Server
How To Create a New Table in a Given Schema in SQL Server? When you create a new table, you can specify in which schema you want this table to be located by prefixing the table name with the schema name. In the tutorial example below, a new table "test" is created in schema "fyi": USE FyiCenterData;...
2016-10-22, 1487🔥, 0💬

Connecting Windows Applications to SQL Servers via ODBC
How Can Windows Applications Connect to SQL Servers via ODBC? One way of connecting a windows application to a SQL Server is to use ODBC drivers. The requirements to do this is summarized here: The SQL Server must have TCP/IP protocol enabled with a specific port number. The SQL Server Browser Servi...
2024-03-17, 1486🔥, 0💬

PHP MSSQL - Inserting Data into an Existing Table
PHP MSSQL - How To Insert Data into an Existing Table? 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 $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_select_db('FyiCenterData ',$con); $...
2024-03-07, 1486🔥, 0💬

PHP ODBC - Query Multiple Tables Jointly
PHP ODBC - How To Query Multiple Tables Jointly? If you want to query information stored in multiple tables, you can use the SELECT statement with a WHERE condition to make an inner join. Assuming that you have 3 tables in a forum system: "users" for user profile, "forums" for forums information, an...
2023-12-30, 1486🔥, 0💬

PHP ODBC - Including Text Values in SQL Statements
PHP ODBC - How To Include Text Values in SQL Statements? Text values in SQL statements should be quoted with single quotes ('). If the text value contains a single quote ('), it should be protected by replacing it with two single quotes (''). In SQL language syntax, two single quotes represents one ...
2024-05-05, 1485🔥, 0💬

PHP ODBC - Inserting Multiple Rows with a Subquery
PHP ODBC - How To Insert Multiple Rows with a subquery? If want to insert rows into a table based on data rows from other tables, you can use a subquery inside the INSERT statement as shown in the following script example: &lt;?php $con = odbc_connect('FYI_SQL_SERVER', 'sa','FYIcenter');$sql = "...
2024-05-29, 1483🔥, 0💬

PHP MSSQL - mssql_rows_affected() - Number of Affected Rows
PHP MSSQL - How To Get the Number of Affected Rows? If you insert multiple rows with a single INSERT statement, you can use the mssql_rows_affected() function to find out how many rows were inserted. mssql_rows_affected($connectio n)returns the number of affected rows of the last INSET, UPDATE or DE...
2024-02-28, 1483🔥, 0💬

PHP MSSQL - Updating Existing Rows in a Table
PHP MSSQL - How To Update Existing Rows in a Table? Updating existing rows in a table requires to run the UPDATE statement with a WHERE clause to identify the row. The following sample script updates one row with two new values: &lt;?php $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_...
2024-02-18, 1483🔥, 0💬

"OPEN" - Executing the Query of a Cursor in SQL Server
How To Execute the Cursor Queries with "OPEN" Statements in SQL Server Transact-SQL? Once a cursor is declared, you need to execute the query attached to the cursor so that the result set returned from the query can be accessed through the cursor. To execute the cursor query, you should use the OPEN...
2016-10-17, 1481🔥, 0💬

mssql_get_last_message() - Retrieving Error Messages
How To Retrieve Error Messages using mssql_get_last_message()? When you call mssql_query() to execute a SQL statement, and the execution failed on the SQL Server, you can use mssql_get_last_message() function to retrieve the error messages. The tutorial script below shows you a good example: &lt...
2024-04-07, 1480🔥, 0💬

<< < 44 45 46 47 48 49 50 51 52 53 54 > >>   ∑:1328  Sort:Date