Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / database

Database

database

Great Reads

by ASP.NET Community
IntroductionnAML (.NET Application Modeling Language, pronounced as “namel”) is a visual modeling semantics to model .net applications with wide
by JasonShort
Here are 10 things to make your desktop database apps better
by Michael Sydney Balloni
Wanna add basic database functionality to your C++ app? Too lazy to use SQLite directly? Read on!
by SrikantSahu
This tip gives basic commands to import table from Mysql to Hadoop File system and Import the files from HDFS back to Mysql.

Latest Articles

by ASP.NET Community
IntroductionnAML (.NET Application Modeling Language, pronounced as “namel”) is a visual modeling semantics to model .net applications with wide
by JasonShort
Here are 10 things to make your desktop database apps better
by Michael Sydney Balloni
Wanna add basic database functionality to your C++ app? Too lazy to use SQLite directly? Read on!
by SrikantSahu
This tip gives basic commands to import table from Mysql to Hadoop File system and Import the files from HDFS back to Mysql.

All Articles

Sort by Score

database 

by SrikantSahu
This tip gives basic commands to import table from Mysql to Hadoop File system and Import the files from HDFS back to Mysql.
by Bryan Kowalchuk
The two most common database lookup table patterns are examined
by Marian Placko
This article shows a simple hack of a built-in MS SQL Server WITH ENCRYPTION mechanism
by DrABELL
Technique to extend capability of standard SQL by adding the Aggregate Product Function
by nickdenker
An ORM style layer which turns Azure Table Storage into a cheap and scalable indexed noSQL database - without the costs associated with Azure CosmosDB.
by Wild-Programmer
Boost application speed and performance
by reshi999
Thanks for that. In MS SQL Server, I use the following technique to avoid full compile:DECLARE @sql VARCHAR(100)DECLARE @pk INTSET @pk = 2SET @sql = 'SELECT id, pcname FROM pod WHERE id = ' + CAST(@pk AS VARCHAR)EXEC (@sql)-- or -- EXEC sp_sqlexec @SQL
by NightWizzard
Convert amounts to their spoken equivalents
by Deepali Dhingra
This tip explains how to create a to do or Shopping List app with listview, sqlite, dialog and customadapter.
by Shweta Lodha
Automatic numbering for the primary key column
by adriancs
A tool to backup & restore all MySQL databases in one click
by #realJSOP
Using common table expressions to build data from thin air.
by saddam abu ghaida
This article describes how to convert any Data Table to List of Objects at runtime using Reflection
by Rijwan Ansari
How to compare two databases using SQL Server Database Project (Template) available in VS.
by binit.ku.singh
Connect MongoDB from any working directory on ubuntu
by Anis Derbel
The easy way to connect to Mysql using Wamp server on WPF
by Pranay Rana
Convert DateTime string to DateTime variable
by RickZeeland
This console application converts an SQL Server database to PostgreSQL.
by Midi_Mick
A set of helper functions to cope with DBNull results from database queries
by Mycroft Holmes
Assuming that a carriage return represents a line of code, this will count the lines of code in a SQL 2008 database:SELECT ROUTINE_NAME,ROUTINE_TYPE,LEN(ROUTINE_DEFINITION )-len(REPLACE(ROUTINE_DEFINITION,CHAR(10),'')) LOCFROM INFORMATION_SCHEMA.ROUTINESCOMPUTE...
by markkang
This tip describes how to generate insert SQL statement from the records in an existing table in SQL server database
by Aadhar Joshi
Creating job in sql server which automates taking backup of all stored procedures and functions in physical drive.
by Malak Zia Nasir
Cloud computing is the trend of nowadays; this article provides some basic steps to create and connect a Windows Azure SQL Database to a simple application.
by JasonDove
This is a great to allow users control over their reports and cutting down on the volume of reports needed to meet the business’s needs.The basis of this solution is to control which fields are grouped on within the report which will in turn change the summary operations and change the...
by JasonDove
I hate sub reports and always consider them the last resort in any reporting solution. The negative effect on performance and maintainability is just not worth the easy ride they give the report writer. Nine times out of ten reporting requirements can be met using a little forethought and...
by JasonDove
It is complete, your masterpiece report. Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways.Then….Disaster!You try to run the report for a month against the live database and not...
by VijayRana
CRUD operation in ASP.NET/C# with SQL Server for beginners
by Manas Bhardwaj
I had these similar databases on my dev environment which I had to delete multiple times during development. As this process was becoming more and more mechnical, I wanted to have a script which would do this for me.
by GabrieleTronchin
Compare two databases to detect which object has been modified from an old version of the same database.
by Suvendu Shekhar Giri
Enhancement on dropping an object with check for existence in SQL Server 2016
by Bob Crowley
How to use a CASE statement in ORDER BY to avoid dynamic SQL
by Eligio Morgado H.
Compare two SQL Server databases and show difference in tables and fields
by kennysun
encrypt all stored procedures in SQL server with powershell
by DiponRoy
How to handle database scheme changes with normal SQL scripts, without migration in Entity Framework code first
by Michael Haephrati
How to overcome an error message preventing you from saving a change in an SQL Server database
by NIKS SHINE
Uploading database of higher version of DBMS to the lower version one.
by Sarathi Balakrishnan
Remove duplicate files with same file content, even with different file name using FILETABLE with simple CTE.
by Pranay Rana
Problem : - During project development I got the requirement that I have to modified the column name of the table which is used in the no of procedure i.e i have to found all procedure related to that table and modify it For the above problem following are the solution that i used First ...
by Tomas@PawSQL
How to cope with all scenarios regarding NULL value handling in your daily work
by dmgcodevil
Framework for performing aggregation and plain MongoDB queries in myBatis style
by ergohack
System.Data.SQLite is great, but was missing some BLOB support. Switching to the native source project was easier than expected and provided significant functionality benefits.
by PIEBALDconsult
This is an alternative for "C# Convert DataTable to List of Objects Dynamically"
by AivanF
Read how to add a dynamic table on Google map for your webpage
by Carlos Luis Rojas Aragonés
How to backup multiple databases using Perl
by kasiarun
How to connect to Analysis Services (SSAS) from a different domain user
by Rijwan Ansari
Learn about SQL Server Database Project (Template) available in VS
by ludovicianul
The easiest and elegant way to read images from the database and display them in the UI.
by RasikaLB
You can find queries to find a specific string from MSSQL Server
by jim lahey
Please see my alternative tip #2:Do the same thing with SMO[^]There's a Microsoft API for all this, it's been around for a while.
by Member 2077086
Simply add your search phrase and run to find jobs, Stored Procedures, Keys, Tables, Views, Indexes, Defaults, and Functions.set nocount on declare @Keyword as varchar(200)set @Keyword = 'Search prase'--<---- enter keyword here--Search jobsselect name Job, enabled , description, ...
by Ed Nutting
How to fix LocalDB / SQL Server: "Cannot open database "XYZ" requested by the login. The login failed. Login failed for user ABC"
by Amit Singh Baghel
Saving Details Table Data (An HTML Table) in Database by converting it into a jagged array and passing it to a table type parameter
by NightWizzard
Read and/or modify database objects like views, triggers, stored procedures and functions from .NET code.
by Rohan Kishor Garud
RoundhousE (RH) is a database migrations engine that uses plain old SQL Scripts to transition a database from one version to another.
by thatraja
How to Shrink SQL Server database files?
by thatraja
How to Shrink SQL Server database log files?
by Huisheng Chen
DUMP TRANSACTION FooDB WITH NO_LOGBACKUP LOG FooDB WITH NO_LOGDBCC SHRINKDATABASE(FooDB)EXEC sp_dboption 'FooDB', 'autoshrink', 'TRUE'
by Database Star
How to use these three functions and what the differences are between them
by arith silva
EffiProz(www.e...
by DrABELL
HTML5/CSS3 advanced formatting of web Tables and ASP.NET GridView
by Satya Karki
How to import or restore BACPAC file using SSMS
by Emiliarge
A JavaFX/Swing NetBeans 8.0 Project with JFrame created by NetBeans's GUI Builder
by Masteramuk
Basic rules for using MySQL Cluster (NDB) from MyISAM or InnoDB
by Md.Sajidur rahman
This structure describes how to process data from multiple branches and store to analysis.
by DiponRoy
The aim of this helper class is to divide a large IEnumerable into multiple small list.
by dontumindit
While dealing with databases, sometimes there is a need to get a list of tables in the application
by Armando de la Torre
How to load an image from the filesystem and save it into a Database
by raddevus
Function to help convert null to DBNull.Value for inserting in database
by VIGNESH SUKUMAR
Quick view of Biztalk MessageBox Tables
by Clifford Nelson
Method to change source of a Form’s Subform source to a Query or Table in Microsoft Access
by rev78
Simply bypass the 255 columns in MFC CRecordset
by MinhajMohammed
This article is not going to give you a pinpoint solution for a specific delete challenge, but rather it is meant to give a broader picture of the problem domain and the various tools you can opt based on your situation.
by DiponRoy
Upgrade a legacy ASP.NET project to use managed Oracle.ManagedDataAccess.Client instead of unmanaged Oracle.DataAccess.Client while using Entity Framework DB first or EDMX.
by Foothill
A Primer for Writing Parameterized Oracle Queries for the .NET SQL Server Developer
by cesar_boucas
"Application performance depends on the number of database round-trips to retrieve data. The less round-trips, the better the performance."
by #realJSOP
It doesn't always happen the way you expect.
by Peter Leow
The OO way to writing your database operation code in PHP
by Sifiso W Ndlovu
This tip illustrates a workaround to SQL Server pivoting on variable character data types.
by Santopk
Oracle Paging
by fgoldenstein
Cannot open Microsoft Access database -> Exception message "unknown"
by Gene R. Browning
Generate random dates (and times if you like) for your test data environment.
by Indrajeet Sutar
Hi, on many occasions we want to search some repeated values in one or more columns. It is quite simple to do this...select ColumnName, count(ColumnName) as NumberOfTimesfrom TableNameGroup By ColumnNamehaving (count(ColumnName) > 1)At the same time, there is also a requirement...
by thatraja
The below query can be used to get the record count of all tables in the current database.
by Md. Marufuzzaman
This is good... You can also consider this link.[^]
by tarun_j200
Also use either this one:SELECT OBJECT_NAME(SYSINDEXES.id), SYSINDEXES.rowcntFROM SYSINDEXES INNER JOIN SYSOBJECTS ON SYSINDEXES.id = SYSOBJECTS.idWHERE SYSINDEXES.indid < 2 AND SYSOBJECTS.xtype = 'U'or this one:SELECT OBJECT_NAME(id),rowcnt FROM SYSINDEXES WHERE...
by Pranay Rana
Number of different ways to get total number of rows from tables
by Graham Cottle
Sometimes it is necessary to have the schema name included as well. I concatenate with the table name for my convenience, but it is not vital to do so.SELECT sys.sysindexes.rows, sys.schemas.name + '.' + sys.objects.nameFROM sys.objectsINNER JOIN sys.schemasON ...
by Shahriar Iqbal Chowdhury/Galib
Reset PLSQL sequence value
by hmdmgd3
SQL code allows you to find objects using multiple keywords in your DB
by Mike Trank
Simple Daily SQL Server Database Backup Batch File
by SantanuDebnath
Write one SP for multiple Search
by Gaurav Dudeja India
The following query uses the sys.objects catalog view to return all database objects that have been modified in the last 10 days.SELECT name AS object_name ,SCHEMA_NAME(schema_id) AS schema_name ,type_desc ,create_date ,modify_dateFROM sys.objectsWHERE modify_date >...
by Robby Tendean
How to do SQL atomic operations on UPDATE and DELETE syntax.
by dontumindit
Installing Oracle or SQL Server just to practice SQL Queries is not a good idea. They occupy a lot of space and also slow down the normal processing of the PC.
by JoaoSousa23
SQL Server Data Tools to Visual Studio 2013 - Database Reverse Engineering
by ergohack
This SQLite Data Object Window base class automates the data updates and the data bindings between the XAML presentation and the SQLite database allowing the minimum of code needed to present and edit SQLite database records.
by Arif H Shigri
This tip will discuss the difference between ROW_NUMBER(), RANK() and DENSE_RANK().
by sukeshchand
How to effectively store huge pieces of information by consuming less space
by Mahendra Vishwakarma
Tips for SQL-Indexes
by Syed Moula Ali
Replicate/Clone/Duplicate selected data in a Table using merge statment
by Tamer J. Mehyar
A simple way to keep track of DB objects versions (DDL updates) in SQL Server
by pankajupadhyay29
A nice way to get aggregated value without group by
by Mike Hankey
Updating an SQLite database to a new version and copying the contents of the old one into the updated database.
by #realJSOP
A scalar function to determine if a given DateTime is one of the ten US federal holidays, using SQL Server.
by DrABELL
Generate large data series by using Cartesian Product and small data table
by OriginalGriff
Visual Studio has a Server Explorer built in to handle database access - it can lalso generate database connection strings ready for saving in application config files.
by Bruce Yang CL
A way to query the data from Internet
by Sudheer Reddy Battula
My perspective on “where to begin” to address this issue in a general sense for a Microsoft centric web application.
by deostroll
write classes meant for use in aspx code behind pages which talk with the database
by Magyar András
Load videos automatically from selected Youtube channel with PHP and Youtube Data API v3