I want to write similar to "click for more".
I cant remember this tech. I could via sql query. I开发者_Python百科 want to select data's first 30 character.
How?
Every SQL flavor I've worked with has a substring function:
Oracle, MySQL, PostgreSQL, SQLite:
SELECT SUBSTR(column, 1, 30) FROM table;
SQL Server, MySQL:
SELECT SUBSTRING(column, 1, 30) FROM table;
Alternatively, you can make use of the LEFT function, which is supported by some of these DBs:
MySQL, SQL Server:
SELECT LEFT(column, 30) FROM table;
And of course you can use a column alias, like:
SELECT SUBSTR(column, 1, 30) AS partial FROM table;
SELECT SUBSTRING(column, 1, 30) AS partial FROM table;
In mysql string start point is 1 so you should use
SELECT SUBSTR(column, 1, 30) FROM table;
SELECT LEFT(Data,30) FROM MyTable
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论