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

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, 1376🔥, 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, 1375🔥, 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, 1375🔥, 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, 1373🔥, 0💬

PHP MSSQL - Dropping an Existing Table
PHP MSSQL - How To Drop an Existing Table? If you need to delete a table created before, you can run the DROP TABLE SQL statement using the mssql_query() function, as shown in the following sample script: &lt;?php $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_select_db('FyiCenterData ...
2024-03-07, 1372🔥, 0💬

SQL Server FAQs - PHP ODBC Functions - Connection and Query Execution
A collection of 14 FAQs on using PHP ODBC functions to connect to SQL Server databases. Clear explanations and tutorial exercises are provided on testing ODBC DSN settings; creating connection to a SQL Server through a DSN; executing SQL statements; looping through result set; Executing prepared sta...
2024-03-17, 1371🔥, 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, 1368🔥, 0💬

Requirements to Use ODBC Connections in PHP
What Are the Requirements to Use ODBC Connections in PHP Scripts? If you are planning to use ODBC connections to access SQL Server databases in PHP scripts, you need to check the following requirements: The PHP engine must support ODBC functions. If you install PHP 5.2.2 from The PHP Group, the ODBC...
2024-03-17, 1368🔥, 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, 1367🔥, 0💬

Providing Column Names in INSERT Statements in SQL Server
How to provide column names in INSERT Statements in SQL Server? If you don't want to specify values for columns that have default values, or you want to specify values to columns in an order different than how they are defined, you can provide a column list in the INSERT statement. If a column is om...
2016-11-02, 1367🔥, 0💬

Counting Groups Returned from GROUP BY in MySQL
How To Count Groups Returned with the GROUP BY Clause in MySQL? If you use the COUNT(*) function on groups returned with the GROUP BY clause, it will count the number of rows within each group, not the number of groups. If you want to count the number of groups, you can put the GROUP BY query into a...
2017-12-21, 1365🔥, 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, 1365🔥, 0💬

Joining Two Tables in a Single Query in SQL Server
How To Join Two Tables in a Single Query in SQL Server? 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 th...
2016-10-30, 1364🔥, 0💬

"TOP" - Return the Top 5 Rows from a SELECT Query in SQL Server
How To Return the Top 5 Rows from a SELECT Query in SQL Server? If you want the query to return only the first 5 rows, you can use the "TOP 5" clause. The TOP clause takes one parameter to indicate how many top rows to return. The following statements returns the first 5 rows and 3 rows from the fyi...
2016-10-29, 1364🔥, 0💬

Inserting Rows with a SELECT Statement in MySQL
How To Insert Multiple Rows with a SELECT Statement in MySQL? If want to insert rows into a table based on data rows from other tables, you can use a sub-query inside the INSERT statement as shown in the following script example: &lt;?php include "mysql_connection.php"; $sql = "INSERT INTO fyi_l...
2017-09-20, 1363🔥, 0💬

Transferring Tables from One Schema to Another in SQL Server
How To Transfer an Existing Table from One Schema to Another Schema in SQL Server? If you want to move an existing table from one schema to another schema, you can use the "ALTER SCHEMA ... TRANSFER ..." statement as shown in the tutorial exercise below: -- Login with "sa" USE FyiCenterData; GO -- C...
2016-10-22, 1363🔥, 0💬

Security Principals Used in SQL Server 2005 in SQL Server
What Are Security Principals Used in SQL Server 2005 in SQL Server? SQL Server 2005 supports several basic security principals located at different levels: Windows-Level Principals: Windows Local Login and Windows Network Domain Login - Used to control accesses to SQL Server instances. SQL Server-Le...
2016-10-20, 1363🔥, 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, 1362🔥, 0💬

PHP ODBC - Creating an Identity Column
PHP ODBC - How To Create an Identity Column? Many tables require an ID column to assign a unique ID number for each row in the table. For example, if you have a table to hold forum member profiles, you need an ID number to identify each member. To allow SQL Server to automatically assign a new ID nu...
2024-04-29, 1360🔥, 0💬

Defining SQL Server 2005 as the DTS Data Source
How To Define SQL Server 2005 as the DTS Data Source? If you want to transform (export) data out of a SQL Server 2005 database table, you need to configure the DTS data source to connect the SQL Server 2005 server. The tutorial exercise below shows you how to connect to the local SQL Server 2005 ser...
2024-01-31, 1360🔥, 0💬

mssql_connect() - Connecting to Different Port Numbers
How To Connect with Different Port Numbers? You know that SQL Server could be configured to accept connections with different TCP/IP port numbers. See other tutorial collections on how to view and configure SQL Server TCP/IP protocol. If you installed SQL Server 2005 Express Edition with default set...
2024-04-14, 1359🔥, 0💬

Defining SQL Server 2005 as the DTS Data Destination
How To Define SQL Server 2005 as the DTS Data Destination? If you are importing data from text files to SQL Server 2005 database tables, you need to define SQL Server 2005 as the DTS data destination. This tutorial continues from the previous tutorial to show you how to tell DTS to create a new tabl...
2024-01-19, 1359🔥, 0💬

Using Subqueries with the IN Operators in SQL Server
How To Use Subqueries with the IN Operators in SQL Server? A subquery can be used with the IN operator as "expression IN (subquery)". The subquery should return a single column with one or more rows to form a list of values to be used by the IN operation. The following tutorial exercise shows you ho...
2016-10-29, 1358🔥, 0💬

What Is a Schema in SQL Server 2005 in SQL Server
What Is a Schema in SQL Server 2005 in SQL Server? A schema is a container of database objects with the following interesting related rules: A schema may contain different object types, like tables, indexes, views, procedures, functions, etc. A database user can be assigned with a default schema. Ob...
2016-10-22, 1357🔥, 0💬

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