I have a table in my database consisting of one column which is NewLanguage(varchar).I insert new languages to the table and i want to select the rows of the table and assign them to a string variable splitted by ','. I try to select the languages as in the code.
public string SelectLanguagesFromDatabase()
{
NpgsqlCommand COM = new NpgsqlCommand(null,dbConnection);
COM.CommandText = "select * from \"Languages\"";
}
How can I select roes from database and assign them to string variable?
In an example
if Languages Column is
NewLanguage
C
c++
java
I want to have a a string as "C,c++,java". How can I do that ? Thanks.