Quantcast
Channel: Coding and Programing » sql
Browsing all 10 articles
Browse latest View live

implement LIMIT with Microsoft SQL Server

Problem And Question I have this query with mysql : select * from table1 LIMIT 10,20 How can I do this with Microsoft sql ? Best Solution And Answer Starting SQL SERVER 2005, you can do this… USE...

View Article



Using result of expression in stored procedure parameter list

Problem And Question I’m trying to write a stored procedure to assist with development of our database, but I’m having some trouble using it. For example: DECLARE @pID int; SET @pID = 1; EXEC WriteLog...

View Article

Can I parameterize table name in prepared statement

Problem And Question I’ve used the mysqli_stmt_bind_param function several times. However, if I separate variables that I’m trying to protect against SQL injection I run into errors. Here’s some code...

View Article

get around MySQL Errcode 13 with SELECT INTO OUTFILE

Problem And Question I am trying to dump the contents of a table to a csv file using a MySQL SELECT INTO OUTFILE statement. If I do: SELECT column1, column2 INTO OUTFILE 'outfile.csv' FIELDS TERMINATED...

View Article

dump data of some SQLite3 tables

Problem And Question How do I dump the data, and only the data, not the schema, of some SQLite3 tables of a database (not all the tables)? The dump should be in SQL format, as it should be easily...

View Article


randomly select rows in SQL

Problem And Question I am using MSSQL Server 2005. In my db, I have a table “customerNames” which has two columns “Id” and “Name” and approx. 1,000 results. I am creating a functionality where I have...

View Article

delete duplicate entries

Problem And Question I have to add a unique constraint to an existing table. This is fine except that the table has millions of rows already, and many of the rows violate the unique constraint I need...

View Article

Search for string in all tables, rows and columns of DB

Problem And Question I am lost in a big database and I am not able to find where the data I get comes from. I was wondering if it is possible with SQL Server 2005 to search for a string in an all the...

View Article


get column names from table

Problem And Question I need to query the database to get the column/field names, not to be confused with data in the table. For example, if I have a table named EVENT_LOG that contains eventID,...

View Article


Looking for comparison of Scala persistence frameworks

Problem And Question I would like to use Scala to persist data to a relational database, so what I am looking for are examples of CRUD operations using Scala. I would like to code on a lower level of...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images