Get the App
SLTechnology News&Howtos  ›  Database  › 

The solution of multiplicative sign error report in SQL statement

Shulou Source: shulou.com Published: 2022-05-31 18:07:50 10月04日 Update

This article mainly explains the "SQL statement contains a multiplication sign error solution", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "SQL statement contains multiplication sign error solution" bar!

In ADO, we need to use multiplication in the SQL statement, but there is always an error when executing the program after adding'*', because the'* 'coincides with the' * 'keyword in sql, so the compilation will go wrong.

Solution: put the multiplication outside the SQL statement, put the result in a variable, and then reference it in the sql statement

Int count = (this.AspNetPager1.CurrentPageIndex-1) * this.AspNetPager1.PageSize;string sql = "select top" + count+ "E_Id from Emp order by E_Id asc" / / Custom SQL statement Thank you for your reading, the above is the content of "SQL statement contains the solution of multiplying sign error report". After the study of this article, I believe you have a deeper understanding of the problem that SQL statement contains multiplication sign error report solution, and the specific use situation still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Statements multiplication signs methods learning multiplication content operations keywords methods variables that is ideas situations articles more knowledge knowledge points programs articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Apple vpn MySQL Shulou Technology