| |

VerySource

 Forgot password?
 Register
Search
View: 683|Reply: 3

| M | Field is too long, can it be displayed on multiple lines

[Copy link]

2

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-15 16:20:01
| Show all posts |Read mode
Ok my sql
string sql;
sql = "SELECT * FROM (SELECT MAX (id) AS id, type FROM merchandise GROUP BY type) f INNER JOIN (SELECT c.id, a.main, b.kind, c.name, c.type, c.present , c.image FROM main a INNER JOIN merchandise c ON a.id = c.main INNER JOIN kind b ON c.kind = b.id) e ON f.id = e.id ORDER BY f.id DESC "

I don't want to use
sql = "*********"
sql + = "*******" this way
Is there sql = "****************
            ****************
            ****************"this way
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 United States

Post time: 2020-1-18 21:18:01
| Show all posts
sql = @ "
a
b
bs
b
c
bz
b
 ";
Reply

Use magic Report

0

Threads

322

Posts

115.00

Credits

Newbie

Rank: 1

Credits
115.00

 Invalid IP Address

Post time: 2020-1-18 21:27:01
| Show all posts
Just add @ in front.
Reply

Use magic Report

2

Threads

6

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-1-18 21:54:01
| Show all posts
StringBuilder strSql = new StringBuilder ();
strSql.Append ("insert into tb_s_user (");
strSql.Append ("ID, LoginName, Password, UserName, UserSign)");
strSql.Append ("values ​​(");
strSql.Append ("@ ID, @ LoginName, @ Password, @ UserName, @ UserSign)");

strSql.ToString ()
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list