Questions tagged as 'sql'

3
answers

Order SQL for 1,2,3 instead of 1,10,2,3

I have a name field in a table that has the following data:    1-Course       2-Course       10-Course When sorting by name it returns 1,10,2 . How to order to bring: 1,2,10 ? Ps: The field is NVARCHAR .     
asked by 12.08.2014 / 23:26
3
answers

LINQ corresponding to SQL with LIKE clause 'XXX%'

I'm using the following LINQ to return a query: .Where(c => c.Nome.Contains(nome)).OrderBy(c => c.Nome) But if the name is Maria , it brings: José Maria Maria José How to bring organized as if executing SQL query? So: WHE...
asked by 12.10.2015 / 21:38
3
answers

What's the difference between using inner join or for relationships in where

Good morning, I have the following doubt, I work in a company where the staff fills up when it comes to using inner join for efficiency and database processing, I wonder if the relationship between tables done no where is really "b...
asked by 23.12.2014 / 13:30
4
answers

How to call a "Stored Procedure"?

How to call a procedure in ASP.NET C #? Here's my simple procedure: CREATE PROCEDURE GetAdmin ( @email VARCHAR(50), @password VARCHAR (50) ) AS BEGIN SET NOCOUNT ON; SELECT * FROM Admin WHERE Email = @...
asked by 13.02.2014 / 18:44
2
answers

What is the performance difference between BIGINT and INT in MySQL?

Is there a negative impact on the performance of MySQL, where the Primary Key is of type BIGINT(20) , instead of INT(11) ?     
asked by 10.07.2015 / 00:51
2
answers

How to get column names from a table in SQL Server?

Languages table: HowdoIselecttheColumnNamesofthistable?Theresultwouldbe:"IDIdioma", "Sigla" and "IDioma".     
asked by 02.03.2017 / 14:20
4
answers

String Concatenation in SQL

I make a query in a table in my MySQL database that returns the following fields: usuarioId nome sobrenome idade sexo escolaridade modeloNome hora Follow the sql below: SELECT sv...
asked by 15.01.2014 / 16:13
3
answers

Doubt in sql select

So ... I have a table that has a sequenc , a num , a dt_inicial , and a dt_final .   My question is: how to make a Select that takes the data between dt_inicial and dt_final showing num between...
asked by 22.08.2014 / 13:55
2
answers

How do I convert LINQ to SQL for MySQL?

I'm trying to remove the use of SQL statements from within the system (to make it flexible on the database that will be used), I use statements Insert , Update and Delete via stored procedure (for performance and for flexibi...
asked by 28.01.2015 / 14:57
1
answer

Type Double and type Decimal

I found in the SO a question with an answer well accepted by the community # But I never had problems with double for monetary calculations, I had yes with float that already left my hair standing, then from this answer stating...
asked by 17.04.2015 / 20:14