Welcome To Snipplr


Everyone's Recent SQL Snippets Tagged table



« Prev 1 Next »
clone table with structure and indexes
0 98 posted 4 years ago by ktrout
Confirm the sql script file is encoded with `UTF-8`
0 95 posted 5 years ago by jacktan
Example of SQL syntax to add a new column to an existing table, define a default value to the columns for the existing rows and also add a check constraint to limit the values that the column can hold.
0 142 posted 8 years ago by denakitan
The inner join could be nested too
0 89 posted 8 years ago by preasha
My Drop Column.sql This template drops a columns of the table.
0 52 posted 9 years ago by edwinet
My Add Column Varchar.sql This template adds a new varchar column to the table.
0 64 posted 9 years ago by edwinet
Get table schema with columns via sql.
0 62 posted 9 years ago by djmornyc
Backup a single table from a database
0 75 posted 9 years ago by tribal
Verify whether temporary table created is exists or not
1 66 posted 9 years ago by hairajeshk
1 43 posted 9 years ago by RealRover
1 67 posted 10 years ago by CDIDevs
A Temp table is great for combining multiple SELECT statements in a Sproc and outputting as just one table. Don't forget to Drop the table after the SELECT * FROM #TempTableName at the end.
2 109 posted 10 years ago by highlyevolved
This will return a list of all the tables in a certain database along with their row count.
1 74 posted 11 years ago by blackf0rk
0 70 posted 11 years ago by smoover
Fields are tab delimited and need to match table schema. I've found the tab separator ASCII(009) preferable over using a comma. The second version can help remove double quotation marks around character fields. Don't forget the keyword LOC...
0 120 posted 11 years ago by RICHARDP
This will create and then populate a MySQL table with a list of the names and USPS abbreviations for US states and possessions in existence.
3 341 posted 12 years ago by cbrant
This will create and then populate a MySQL table with a list of the names and ISO 3166 codes for countries in existence.
5 140 posted 12 years ago by cbrant
« Prev 1 Next »