MySQL Articles

Found 3,543 articles

Date value is not populating while using Native SQL in SAP to insert an Order

Anjana
Anjana
Updated on 13-Mar-2026 404 Views

When inserting date values using Native SQL in SAP ABAP, you may encounter issues with date population. The primary issue is often related to variable binding syntax in the SQL statement. Solution You need to put a colon (:) before the variable to properly bind it in Native SQL. Here's the corrected syntax − EXEC SQL. INSERT INTO order VALUES('2', :sy-datum) ENDEXEC. The colon (:) is essential for host variable binding in Native SQL. Without it, the system treats sy-datum as a literal string rather than a variable reference. Alternative ...

Read More

Adding a condition using SQL or an ABAP program and difference in performance

Rama Giri
Rama Giri
Updated on 13-Mar-2026 321 Views

When adding conditions to filter data, you can choose between implementing the logic in SQL or in an ABAP program. For small datasets like 500 records, there would not be much difference in performance between both options. You can use either of them based on your specific requirements. SQL Approach Using SQL WHERE clause directly in the database query is generally more efficient as it filters data at the database level − SELECT * FROM table_name INTO TABLE lt_table WHERE exp > 5. ABAP Program Approach Alternatively, you can ...

Read More

Changing Data Element of a column and showing description in Transaction SE16N

Anjana
Anjana
Updated on 13-Mar-2026 520 Views

When working with transaction SE16N in SAP, you may need to change the data element of a column to display proper descriptions. This process involves updating the Data Dictionary (DDIC) element and ensuring the system recognizes the changes. Methods to Update Data Element Descriptions Method 1: Activate the Change The primary approach is to activate the change after modifying the data element. This ensures the system properly updates the column description in SE16N. Method 2: Force System Recognition An alternative method involves temporarily creating an error to force the system to refresh the element description ...

Read More

How to display 3 random values from MySQL table?

AmitDiwan
AmitDiwan
Updated on 12-Mar-2026 245 Views

To display random values from a MySQL table, use the RAND() function in the ORDER BY clause to shuffle the rows randomly, and LIMIT to restrict the number of results. The general syntax is − SELECT yourColumnName FROM yourTableName ORDER BY RAND() LIMIT 3; Creating the Demo Table Let us first create a table and insert some records − CREATE TABLE DemoTable646 ( Id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName VARCHAR(100) ); INSERT INTO DemoTable646 (FirstName) VALUES ('John'); INSERT INTO DemoTable646 (FirstName) VALUES ('Bob'); INSERT INTO DemoTable646 (FirstName) VALUES ...

Read More

Searching multiple columns for a row match in MySQL

AmitDiwan
AmitDiwan
Updated on 12-Mar-2026 504 Views

To search multiple columns for a row match in MySQL, you can use the UNION operator. UNION combines the result sets of two or more SELECT statements into a single result, automatically removing duplicate rows. This is useful when you want to search different columns for different criteria and merge the results together. Creating the Demo Table Let us first create a table and insert some records − CREATE TABLE DemoTable645 ( Id INT, FirstName VARCHAR(100) ); INSERT INTO DemoTable645 VALUES (100, 'Chris'); INSERT INTO DemoTable645 VALUES (101, 'Robert'); INSERT INTO DemoTable645 ...

Read More

Difference between an SAP ERP system and DBMS

Samual Sam
Samual Sam
Updated on 12-Mar-2026 3K+ Views

What is DBMS? DBMS or Database Management system is basically the tool/interface required to manage the database.  For example, SQL server or a tool like MYSQL workbench is a DBMS. A DBMS is mainly used by or designed for technical people. What is ERP ERP (Enterprise Resource Planning System) is a complete system with one database and number of function modules and has a number of inputs and output interfaces to be used by everyone. For example, there can be a user interface for customer or business people, another for technical people with various skills. So basically we ...

Read More

Convert timestamp coming from SQL database to String PHP?

AmitDiwan
AmitDiwan
Updated on 11-Mar-2026 509 Views

To convert timestamp to string, use setTimestamp(). Let’s say the following is our input i.e. timestamp −$SQLTimestamp = 1600320600000;We want the following output i.e. Date string −2020-09-17 05:30:00At first, get seconds from Timestamp −$seconds = round($SQLTimestamp/1000, 0);Example Output2020-09-17 05:30:00

Read More

How to convert JS date time to MySQL datetime?

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 1K+ Views

We can convert JS date time to MySQL datetime with the help of toISOString() function.Let us see an example of JavaScript.Example           Web Page Design                document.writeln(new Date().toISOString().slice(0, 19).replace('T', ' '));              Current Date is displayed above... OutputThe following is the output.2018-11-23 11:14:38 Current Date is displayed above...

Read More

How to convert Python date format to 10-digit date format for mysql?

Pranav Indukuri
Pranav Indukuri
Updated on 28-Aug-2025 2K+ Views

While working with databases like MySQL, it’s necessary to store dates in a numeric format, especially for timestamps. MySQL commonly uses Unix timestamps, which are 10-digit numbers representing the number of seconds since January 1, 1970 (known as the epoch). The following are the different methods from the time and datetime modules to convert Python date formats into a 10-digit format (Unix timestamp) suitable for use with MySQL. Using mktime() Method Using strptime() + mktime() Combination Using timestamp() Method Using mktime() Method The mktime() method from ...

Read More

Count the number of columns in a MySQL table with Java

Alshifa Hasnain
Alshifa Hasnain
Updated on 15-Jul-2025 498 Views

In this article, we will learn how to count the number of columns in a MySQL table using JDBC. We will be using the ResultSetMetaData to get details of the table by using simple examples. What is ResultSetMetaData? The ResultSetMetaData is an interface that is present in the java.sql package. Using ResultSetMetaData, we can get information about the table, for example, what are the column names of each and every table, and how many columns are there?. To create the object for ResultSet: ResultSet rs=st.executeQuery("Select * from Student"); The executeQuery method writes the records, which are then stored in the ...

Read More
Showing 1–10 of 3,543 articles
« Prev 1 2 3 4 5 355 Next »
Advertisements