SQL sentences | SoloLearn: Learn to code for FREE!

+10

SQL sentences

I'am trying to make SQL sentences like: The company + company + budget is + budget + . But i can't seem to find out how 😕

12/20/2018 7:00:55 PM

Arne Van Kerckvoorde

8 Answers

New Answer

+9

So I wrote and tested like this: SELECT "my name is" , name FROM table1 WHERE id=1 but return something like this: | my name is | pedro | two columns If you want to concat, use a function SELECT CONCAT ( str1, str2 ) arguments str1, str2 are strings

+8

Its for school and the assignment says i cant use php.

+8

Thanks Pedro it was concat i was looking for 😀

+7

How is your database and table ? I guess that you need a select multiple tables.

+7

And yes i normally use php too for this 😀

+6

Pedro H.J Hi pedro. I just want to make a sentence with values from the database inside the sentence. Like: 'Hi my name is: ' + users.name Without using php 😀

+6

I make this with PHP. Exemplo echo "my name is"; echo $var ; Where var is a variable SELECT result from MYSQL database.

+1

whaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaat