MSSQL | SQLSRV | 비고 |
mssql_bind | sqlsrv_query | With the sqlsrv API, stored procedure parameters are defined in an array that is passed to sqlsrv_query orsqlsrv_prepare. For more information and examples, see How to: Retrieve Output Parameters, How to: Retrieve Input/Output Parameters, andsqlsrv_next_result. |
mssql_close | sqlsrv_close | These functions are equivalent, but note that calling sqlsrv_closereturns a connection to a connection pool. For more information, seeConnection Pooling. |
mssql_connect | sqlsrv_connect | These functions are equivalent, but note thatsqlsrv_connect attempts to use a pooled connection before it creates a new one. For more information, see Connection Pooling. |
mssql_data_seek | sqlsrv_fetch / sqlsrv_fetch_array | The sqlsrv API provides forward-only reading of result sets by default. However, in v1.1 of the driver, you can specify and retrieve any row of a result set with sqlsrv_fetch orsqlsrv_fetch_array. For more information, seeSpecifying a Cursor Type and Selecting Rows. |
mssql_execute | sqlsrv_query | There are no special functions for executing stored procedures in thesqlsrv API. Stored procedures are executed with the sqlsrv_queryfunction. For more information and examples, see How to: Retrieve Output Parameters, How to: Retrieve Input/Output Parameters, andsqlsrv_next_result. |
mssql_fetch_array | sqlsrv_fetch_array | 기능동일 |
mssql_fetch_assoc | sqlsrv_fetch_array | The sqlsrv_fetch_arrayfunction returns a row with both numeric and associative indexes by default. You can retrieve only an associative array by using theSQLSRV_FETCH_ASSOCconstant in the function call. |
mssql_fetch_batch | 지원안함 | While the sqlsrv API does not have a function equivalent ofmssql_fetch_batch, the number of rows in a result set can obtained using sqlsrv_num_rows. As you process rows, you can track the number of remaining rows. |
mssql_fetch_field | sqlsrv_field_metadata | These functions both return metadata about a result set, although they each return slightly different metadata. Seemssql_fetch_field and forsqlsrv_field_metadatadetails. |
mssql_fetch_object | sqlsrv_fetch_object | 기능동일 |
mssql_fetch_row | sqlsrv_fetch_array | These functions are equivalent, but note that thesqlsrv_fetch_arrayfunction returns an array with both numeric and associative indexes by default. You can retrieve only a numeric array by using theSQLSRV_FETCH_NUMERICconstant in the function call. |
mssql_field_length | 지원안함 | Note that for some field types, the maximum length is returned by thesqlsrv_field_metadatafunction. |
mssql_field_name | sqlsrv_field_metadata | In addition to other information, the field name is retuned by thesqlsrv_field_metadatafunction. |
mssql_field_seek | 지원안함 | When using thesqlsrv_get_field function, fields must be accessed in order. The sqlsrv API does not provide a way to access fields randomly. |
mssql_field_type | sqlsrv_field_metadata | In addition to other information, the field name is retuned by thesqlsrv_field_metadatafunction. |
mssql_free_result | sqlsrv_cancel | 기능동일 |
mssql_free_statement | sqlsrv_free_stmt | These functions both free resources associated with a statement, but note that the sqlsrv_free_stmt does this for any statement (not only statements associated with stored procedures). |
mssql_get_last_message | sqlsrv_errors | These functions both return error information about the last operation performed, but the sqlsrv_errorsfunction returns information in an array (error code and error message). |
mssql_guid_string | 지원안함 | While the sqlsrv API does not provide a function for converting GUIDs to strings, you can convert GUIDS to string-compatible types on the server with theCONVERT function. |
mssql_init | 지원안함 | There is no special function for initializing stored procedures in thesqlsrv API. Stored procedures are executed with the sqlsrv_queryfunction. For more information and examples, see How to: Retrieve Output Parameters, How to: Retrieve Input/Output Parameters, andsqlsrv_next_result. |
mssql_min_error_severity | 지원안함 | The sqlsrv API does not provide functionality for filtering errors based on severity. For information on handling errors with thesqlsrv API, see How to: Configure Error and Warning Handling andHow to: Handle Errors and Warnings. |
mssql_min_message_severity | 지원안함 | The sqlsrv API does not provide functionality for filtering errors based on severity. For information on handling errors with thesqlsrv API, see How to: Configure Error and Warning Handling andHow to: Handle Errors and Warnings. |
mssql_next_result | sqlsrv_next_result | 기능동일 |
mssql_num_fields | sqlsrv_num_fields | 기능동일 |
mssql_num_rows | sqlsrv_num_rows | 기능동일 |
mssql_pconnect | sqlsrv_connect | The default behavior of thesqlsrv_connect function is to open a pooled connection if one is available. When a script ends or whensqlsrv_close is called, the connection is returned to the connection pool. For more information, seeConnection Pooling. |
mssql_query | sqlsrv_query | 기능동일 |
mssql_result | sqlsrv_fetch / sqlsrv_get_field | The combination of thesqlsrv_fetch andsqlsrv_get_field functions are equivalent to themssql_result function. Calling sqlsrv_fetchmakes a row of data available for reading andsqlsrv_get_field reads fields in the current row. |
mssql_rows_affected | sqlsrv_rows_affected | 기능동일 |
mssql_select_db | 지원안함 | To select a database with the sqlsrv API, usesqlsrv_query to execute the following query: USE databaseName. |
참고자료
출처 : http://happyjung.com/bbs/board.php?bo_table=lecture&wr_id=1083
'Course > MS-SQL' 카테고리의 다른 글
mssql 보안 주체 dbo 관련 에러 Error: 15517 (0) | 2018.11.07 |
---|---|
[MS SQL] 테이블 정의서 내용 추출하기 (0) | 2016.07.15 |
데이터 export 시에 print 'processed *** total receords' 제거하기 (0) | 2016.06.29 |
MSSQL CONVERT 시 varchar 잘림 문제 (0) | 2016.06.23 |
text 형식의 필드 검색 방법 (0) | 2016.06.22 |