SQL sentences | SoloLearn: Learn to code for FREE!


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


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


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


Thanks Pedro it was concat i was looking for 😀


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


And yes i normally use php too for this 😀


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 😀


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