c# - How can i trim or remove " , " at the end of my query? -


I try to write a query but my query ends with "control nvarchar (500)". How can I remove "" control nvarchar (500) "how can I", "", ""?

  Zero SqlTable (List list MycolumnNames, string TableName) {string text = "Create table ENG _" table name + "(ing _" + table name + "_ id integer primary key ID 1,1), "[four] [] MyChar = {',', ''}; for (int i = 0; i  

I think you want to look at String.Join . You can change your column name string, which contains the SQL definition of your column, e.g. MyColumnName [1] + "Navbar (500)", a list in my column deff array, then join 'that array as a comma separated separator.

Benefits:

  • No 'If I am the last entry',
  • Separate your column names and your SQL rendering for columns

deficiencies .... no one :)

 for  (string name my column name in the list) {listMyColumnDefs.Add (name + "nvarchar (500) "); } String mycolumndef = String.Join (list my column, ",");  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -